diff mbox series

[FFmpeg-devel,06/20] lavfi/vf_crop: switch to query_func2()

Message ID 20241004084230.27419-6-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/20] lavfi/vf_alphamerge: switch to query_func2() | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov Oct. 4, 2024, 8:42 a.m. UTC
---
 libavfilter/vf_crop.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index 4742732b63..f3cbc83b8b 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.c
@@ -95,11 +95,14 @@  typedef struct CropContext {
     double var_values[VAR_VARS_NB];
 } CropContext;
 
-static int query_formats(AVFilterContext *ctx)
+static int query_formats(const AVFilterContext *ctx,
+                         AVFilterFormatsConfig **cfg_in,
+                         AVFilterFormatsConfig **cfg_out)
 {
     int reject_flags = AV_PIX_FMT_FLAG_BITSTREAM | FF_PIX_FMT_FLAG_SW_FLAT_SUB;
 
-    return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(0, reject_flags));
+    return ff_set_common_formats2(ctx, cfg_in, cfg_out,
+                                  ff_formats_pixdesc_filter(0, reject_flags));
 }
 
 static av_cold void uninit(AVFilterContext *ctx)
@@ -405,6 +408,6 @@  const AVFilter ff_vf_crop = {
     .uninit          = uninit,
     FILTER_INPUTS(avfilter_vf_crop_inputs),
     FILTER_OUTPUTS(avfilter_vf_crop_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_QUERY_FUNC2(query_formats),
     .process_command = process_command,
 };