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

Anton Khirnov anton at khirnov.net
Mon Jun 5 13:09:19 EEST 2023


Quoting Stefano Sabatini (2023-06-05 10:08:07)
> Il dom 4 giu 2023, 16:34 Marvin Scholz <epirat07 at gmail.com> ha scritto:
> 
> > On 4 Jun 2023, at 16:25, Stefano Sabatini wrote:
> > [...]
> > > 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.
> >
> > What do you mean by "destructive"?
> >
> 
>  I mean that the dictionary structure will be freed when the last element
> is popped.

It is explicitly mentioned in the documentation that NULL is a valid
representation of an empty dictionary, so I don't think there's anything
destructive here.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list