Quoting Niklas Haas (2023-11-09 13:19:34) > From: Niklas Haas <g...@haasn.dev> > > Even if a query func is set. This is safe to do, because > ff_default_query_formats is documented not to touch any filter lists > that were already set by the query func. > > The reason to do this is because it allows us to extend > AVFilterFormatsConfig without having to touch every filter in existence. > An alternative implementation of this commit would be to explicitly add > a `ff_default_query_formats` call at the end of every query_formats > function, but that would end up functionally equivalent to this change > while touching a whole lot more code paths for no reason. > > As a bonus, eliminates some code/logic duplication from this function. > --- > libavfilter/avfiltergraph.c | 39 ++++++++++++------------------------- > 1 file changed, 12 insertions(+), 27 deletions(-)
Looks ok. I'm also wondering whether we could/should now remove all ff_default_query_formats() calls from the filters and make that function filtergraph-only. -- Anton Khirnov _______________________________________________ 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".