[FFmpeg-devel] [PATCH 12/21] lavfi/vf_transpose: convert to query_func2()

Anton Khirnov anton at khirnov.net
Tue Oct 15 12:47:35 EEST 2024


---
 libavfilter/vf_transpose.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index d2836246b5..79e80cb000 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -52,7 +52,9 @@ typedef struct TransContext {
     TransVtable vtables[4];
 } TransContext;
 
-static int query_formats(AVFilterContext *ctx)
+static int query_formats(const AVFilterContext *ctx,
+                         AVFilterFormatsConfig **cfg_in,
+                         AVFilterFormatsConfig **cfg_out)
 {
     AVFilterFormats *pix_fmts = NULL;
     const AVPixFmtDescriptor *desc;
@@ -68,7 +70,7 @@ static int query_formats(AVFilterContext *ctx)
     }
 
 
-    return ff_set_common_formats(ctx, pix_fmts);
+    return ff_set_common_formats2(ctx, cfg_in, cfg_out, pix_fmts);
 }
 
 static inline void transpose_block_8_c(uint8_t *src, ptrdiff_t src_linesize,
@@ -412,6 +414,6 @@ const AVFilter ff_vf_transpose = {
     .priv_class    = &transpose_class,
     FILTER_INPUTS(avfilter_vf_transpose_inputs),
     FILTER_OUTPUTS(avfilter_vf_transpose_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_QUERY_FUNC2(query_formats),
     .flags         = AVFILTER_FLAG_SLICE_THREADS,
 };
-- 
2.43.0



More information about the ffmpeg-devel mailing list