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

Stefano Sabatini stefasab at gmail.com
Sun Jun 4 17:25:40 EEST 2023

On date Friday 2023-05-26 11:11:48 +0200, Marvin Scholz wrote:
> On 26 May 2023, at 8:05, Stefano Sabatini wrote:
> > On date Monday 2023-05-22 11:23:24 +0200, Marvin Scholz wrote:
> >> On 22 May 2023, at 1:52, Stefano Sabatini wrote:
> > Should we also support the case with multiple same-key values?
> I don't see what could be improved there. You just call it multiple times,
> or what do you mean?
> >

> > Also maybe we should mention that this operation might alterate the
> > order of the entries (unless we add a new flag to shift the
> > trailing data when an entry is removed).

> We currently IIRC nowhere give guarantees on the order of items in the
> dict, which we probably should keep that way especially in regards to
> your next point.

OK, anyway this is pretty unrelated to the current patch (might be
done as a followup). I was checking the current documentation and it's
missing some important information (I'll try to send a patch to fix
that later).


About your patch, please mention that the pop operation is
destructive. We probably want to make that behavior configurable
through flags, but I'm fine to keep the current behavior for
consistency with the set(NULL) operation.


Thanks (sorry again for the slow reply).

More information about the ffmpeg-devel mailing list