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 more important than any performance enhancement for large maps. > + AVMap *set = av_map_new(our_cmp[settype], NULL, NULL); … should be : AVMap set = av_map_create(cmp, NULL, NULL); or : AVMap set; av_map_init(&set, sizeof(set), cmp, NULL, NULL); Regards, -- Nicolas George _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".