[FFmpeg-devel] [PATCH v3] avcodec: add AV_CODEC_FLAG_DROPCHANGED to flags

Gyan ffmpeg at gyani.pro
Wed Apr 17 21:10:28 EEST 2019



On 17-04-2019 11:14 PM, Vittorio Giovara wrote:
> On Tue, Apr 16, 2019 at 3:42 AM Gyan <ffmpeg at gyani.pro> wrote:
>
>> Patch revised as per
>> http://www.ffmpeg.org/pipermail/ffmpeg-devel/2019-April/242591.html
>>
>> Gyan
>>
> sorry if i'm late to the party but why are these new fields in
> avcodeccontext?
> they seem to be perfect candidates for side data, or am i missing something?
The latest patch only adds a constant to avctx. New fields are in 
AVCodecInternal.

The purpose is to allow the user to discard decoded output which 
deviates from initial stream parameters - mainly useful when receiving 
an input over an unreliable transport. The demuxer doesn't always catch 
all corrupted payload, and neither does the decoder (e.g. a mpeg audio 
header with some bits flipped), so some frames with different parameters 
can get through. This causes the filtergraph to be configured, 
destroying its context. Timestamps can go haywire which is not 
acceptable in an ongoing streaming scenario.

Originally I submitted this as a ffmpeg.c patch, but Michael suggested 
that avcodec users may find it useful.

Gyan


More information about the ffmpeg-devel mailing list