[FFmpeg-devel] [PATCH v2 1/3] avutil/dict: add av_dict_pop

Anton Khirnov anton at khirnov.net
Fri Oct 20 11:18:17 EEST 2023


Quoting Andreas Rheinhardt (2023-07-03 20:02:25)
> Marvin Scholz:
> > I honestly can't think of a sensible API design for this,
> > if you have any idea feel free to share.
> > 
> 
> The only way I can think of that allows this is for the user to pass a
> pointer to a (const) AVDictionaryEntry, namely the entry that the user
> wishes to pop. This is of course cumbersome, because it would be two
> function calls.

We could start guaranteeing that entries with the same key are always
returned in insertion order. Now that I think of it there's some code in
ffmpeg CLI that relies on that.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list