[FFmpeg-devel] [PATCH] avcodec/mpeg12dec: Do not alter avctx->rc_buffer_size

Gaullier Nicolas nicolas.gaullier at cji.paris
Mon Feb 24 19:04:34 EET 2020


> De : ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> De la part de Hendrik Leppkes
> Envoyé : lundi 24 février 2020 17:26
> À : FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Objet : Re: [FFmpeg-devel] [PATCH] avcodec/mpeg12dec: Do not alter avctx->rc_buffer_size
> 
> On Mon, Feb 24, 2020 at 5:13 PM Nicolas Gaullier
> <nicolas.gaullier at cji.paris> wrote:
> >
> 
> rc_buffer_size doesn't really have a meaning to a decoder (its for
> encoders and muxers), so why should it not be able to change it to
> match the value it reads from the bitstream?
> 
> - Hendrik

Both because it is not helpful : a later patch will make the value available as side data,
and because API doc (avcodec.h) says "decoding: unused".
The other way would have been to update the doc etc., but it does not seem relevant here.
This comes from a previous review by James and I agreed with him not to change the API.
As soon as this patch is applied, I will send my updated v4 patchset "Fix mpeg1/2 stream copy" which will allow reading rc_buffer_size through side data.
Sorry about that, maybe I should have send all of my patches in a bunch, but this little patch is somewhat unrelated to my original patchset and I thought it was better to separate things this way.

Nicolas


More information about the ffmpeg-devel mailing list