[FFmpeg-devel] [PATCH 07/29] lavc: add a decoder option for configuring side data preference

Anton Khirnov anton at khirnov.net
Tue Mar 5 11:57:33 EET 2024


Quoting Derek Buitenhuis (2024-03-04 15:05:29)
> On 3/4/2024 1:06 PM, Anton Khirnov wrote:
> > +    /**
> > +     * Decoding only. May be set by the caller before avcodec_open2() to an
> > +     * av_malloc()'ed array (or via AVOptions). Owned and freed by the decoder
> > +     * afterwards.
> > +     *
> > +     * By default, when some side data type is present both in global
> > +     * user-supplied coded_side_data and inside the coded bitstream, avcodec
> > +     * will propagate the latter to the decoded frame.
> > +     *
> > +     * This array contains a list of AVPacketSideDataType for which this
> > +     * preference should be switched, i.e. avcodec will prefer global side data
> > +     * over those in stored in the bytestream. It may also contain a single -1,
> > +     * in which case the preference is switched for all side data types.
> > +     */
> > +    int        *side_data_prefer_global;
> 
> My only comment is that it would be nice to include some text about what the practical
> application of this option is, rather than just technical details. Something like:
> 
>     This can be useful, when, for example, input contains data in both the container
>     and bitstream.

Added text to that effect locally.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list