[FFmpeg-devel] [PATCH 12/24] lavfi/vf_mix: switch to query_func2()

Anton Khirnov anton at khirnov.net
Sat Oct 12 20:02:27 EEST 2024


---
 libavfilter/vf_mix.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_mix.c b/libavfilter/vf_mix.c
index 16d6bf328c..f1e0cf617c 100644
--- a/libavfilter/vf_mix.c
+++ b/libavfilter/vf_mix.c
@@ -64,7 +64,9 @@ typedef struct MixContext {
     FFFrameSync fs;
 } MixContext;
 
-static int query_formats(AVFilterContext *ctx)
+static int query_formats(const AVFilterContext *ctx,
+                         AVFilterFormatsConfig **cfg_in,
+                         AVFilterFormatsConfig **cfg_out)
 {
     unsigned reject_flags = AV_PIX_FMT_FLAG_BITSTREAM |
                             AV_PIX_FMT_FLAG_HWACCEL   |
@@ -76,7 +78,8 @@ static int query_formats(AVFilterContext *ctx)
     else
         accept_flags |= AV_PIX_FMT_FLAG_BE;
 
-    return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(accept_flags, reject_flags));
+    return ff_set_common_formats2(ctx, cfg_in, cfg_out,
+                                  ff_formats_pixdesc_filter(accept_flags, reject_flags));
 }
 
 static int parse_weights(AVFilterContext *ctx)
@@ -462,7 +465,7 @@ const AVFilter ff_vf_mix = {
     .priv_size     = sizeof(MixContext),
     .priv_class    = &mix_class,
     FILTER_OUTPUTS(outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_QUERY_FUNC2(query_formats),
     .init          = init,
     .uninit        = uninit,
     .activate      = activate,
@@ -547,7 +550,7 @@ const AVFilter ff_vf_tmix = {
     .priv_class    = &tmix_class,
     FILTER_OUTPUTS(outputs),
     FILTER_INPUTS(inputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_QUERY_FUNC2(query_formats),
     .init          = init,
     .uninit        = uninit,
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS,
-- 
2.43.0



More information about the ffmpeg-devel mailing list