[FFmpeg-devel] [PATCH][RFC] avcodec/avutil: Add timeline side data

Rostislav Pehlivanov atomnuker at gmail.com
Thu Apr 5 22:14:13 EEST 2018

On 5 April 2018 at 16:26, Derek Buitenhuis <derek.buitenhuis at gmail.com>

> On 4/3/2018 5:26 PM, wm4 wrote:
> > Uh no idea. One angle:
> >
> > The idea with AVStream side data is that it can be attached as AVPacket
> > side data. So if an API user is fine with treating all kinds of side
> > data per AVPacket, it can call av_format_inject_global_side_data() and
> > ignore AVStream side data. Basically, you could ask the question
> > whether this kind of side data makes sense as per-AVPacket, and if not,
> > then it should be AVStream side data. Maybe.
> It doesn't make sense as per-packet side-data.
> > Another angle is that the API better because side data would not add
> > yet another AVStream field. It makes the API more discoverable: the API
> > user can easily detect an unsupported side data type and handle it as
> > soon as he has a sample, instead of having to go over every AVStream
> > field during the initial implementation, and wondering what the hell it
> > does (and things going wrong when not handling explicitly). I probably
> > didn't word that too well, but I hope you get what I mean.
> I got what you mean. I still don't have an opinion one way or another.
> It's a trade-off between Yet Another AVStream Field vs a more complex
> API and implementation as side data. I may be slightly erring towards
> an AVStream field.
> I would be interested to hear others' opinions on this if they have
> a stronger one.
I think it makes sense to have it in AVStream rather than as side data.
I don't have an opinion on whether codec switches should be indicated. It
would be nice for them to be a separate segment if that's possible and
reliable, since it would allow users to init all they would at startup. If
not then they can just handle them as they come like a stream and reinit if
they have to. After all this API only concerns complete files rather than

More information about the ffmpeg-devel mailing list