Andreas Rheinhardt (12020-08-18): > 1. Adding this struct has also another benefit besides the ones in your > two other patches: One can simplify the freeing process by adding a new > ff_formatscfg_unref() (I'm not sure on the name). This could also be > used in the uninit function of the aformat filter. If I am not mistaken, > the only place outside of formats.c where one needs to unref an > AVFilterContext/AVFilterChannelLayout is in hwdownload where one only > needs ff_formats_unref() -- ff_channel_layouts_unref() can therefore be > made static. (This presumes that redundant ff_*_unref() have been > removed as is done in [1].)
Actually, I find the use of ff_formats_unref() in filter somewhat suspicious. The functions are designed to free their arguments if something fails, so as not to leak anything. > 2. For the ease of backportability the double-frees/memleaks ([2] and > the other patches from that patchset) should be applied before this one. What is missing before applying this? Anyway, one of the next steps I consider this is to merge AVFilterChannelLayout into AVFilterFormats. Still with three versions of the merge functions, but some other functions can be made generic. That would allow to make the merge / can_merge and other functions part of a structure of callback, and make the architecture of the negotiation more nimble, paving the way for other media types and multi-level negotiation. Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ 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".