Michael Niedermayer (HE12025-04-15):
> or is the goal to avoid the error handling?
Both are desirable. I am sure we have in our API a few functions that
take a dictionary but are very fast; is it really worth digging around
to convince you that avoiding dynamic allocations is worth it?
> also in
On Tue, Apr 15, 2025 at 09:14:42PM +0200, Nicolas George wrote:
> Michael Niedermayer (HE12025-04-15):
> > Where exactly would that benefit FFmpeg ?
> > Dictionaries generally are used to move stuff aorund, like metadata or
> > options.
> > Or may be used in the future to keep track of some mapping
Michael Niedermayer (HE12025-04-15):
> Where exactly would that benefit FFmpeg ?
> Dictionaries generally are used to move stuff aorund, like metadata or
> options.
> Or may be used in the future to keep track of some mappings like
> timestamps to file positions during demuxing or muxing
> Or maybe
Hi Nicolas
On Tue, Apr 15, 2025 at 08:45:27PM +0200, Nicolas George wrote:
> Michael Niedermayer (HE12025-04-15):
> > +AVMap *av_map_new(AVMapCompareFunc cmp_keyvalue, AVMapCopyFunc copy,
> > AVMapFreeFunc freef)
> > +{
> > +AVMap *s = av_mallocz(sizeof(*s));
> > +if (!s)
> > +ret
Michael Niedermayer (HE12025-04-15):
> +AVMap *av_map_new(AVMapCompareFunc cmp_keyvalue, AVMapCopyFunc copy,
> AVMapFreeFunc freef)
> +{
> +AVMap *s = av_mallocz(sizeof(*s));
> +if (!s)
> +return NULL;
Please no.
The ability to allocate on stack including room for a few values is