diff mbox series

[FFmpeg-devel,08/21] lavfi/vf_swapuv: convert to query_func2()

Message ID 20241015094744.10713-8-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/21] lavfi/vf_setparams: convert to query_func2() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 fail Make fate failed

Commit Message

Anton Khirnov Oct. 15, 2024, 9:47 a.m. UTC
---
 libavfilter/vf_swapuv.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c
index 5c7c69494e..866d0824f4 100644
--- a/libavfilter/vf_swapuv.c
+++ b/libavfilter/vf_swapuv.c
@@ -67,7 +67,9 @@  static int is_planar_yuv(const AVPixFmtDescriptor *desc)
     return 1;
 }
 
-static int query_formats(AVFilterContext *ctx)
+static int query_formats(const AVFilterContext *ctx,
+                         AVFilterFormatsConfig **cfg_in,
+                         AVFilterFormatsConfig **cfg_out)
 {
     AVFilterFormats *formats = NULL;
     int fmt, ret;
@@ -78,7 +80,7 @@  static int query_formats(AVFilterContext *ctx)
             return ret;
     }
 
-    return ff_set_common_formats(ctx, formats);
+    return ff_set_common_formats2(ctx, cfg_in, cfg_out, formats);
 }
 
 static const AVFilterPad swapuv_inputs[] = {
@@ -95,6 +97,6 @@  const AVFilter ff_vf_swapuv = {
     .description   = NULL_IF_CONFIG_SMALL("Swap U and V components."),
     FILTER_INPUTS(swapuv_inputs),
     FILTER_OUTPUTS(ff_video_default_filterpad),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_QUERY_FUNC2(query_formats),
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
 };