[FFmpeg-cvslog] lavfi/vf_stereo3d: convert to query_func2()

Anton Khirnov git at videolan.org
Thu Oct 17 12:12:32 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Oct 15 11:24:35 2024 +0200| [6ed357ce77c2581f4a51d2591312d8592dba31e6] | committer: Anton Khirnov

lavfi/vf_stereo3d: convert to query_func2()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6ed357ce77c2581f4a51d2591312d8592dba31e6
---

 libavfilter/vf_stereo3d.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c
index dc9cc33556..95e750d1c6 100644
--- a/libavfilter/vf_stereo3d.c
+++ b/libavfilter/vf_stereo3d.c
@@ -279,9 +279,11 @@ static const enum AVPixelFormat other_pix_fmts[] = {
     AV_PIX_FMT_NONE
 };
 
-static int query_formats(AVFilterContext *ctx)
+static int query_formats(const AVFilterContext *ctx,
+                         AVFilterFormatsConfig **cfg_in,
+                         AVFilterFormatsConfig **cfg_out)
 {
-    Stereo3DContext *s = ctx->priv;
+    const Stereo3DContext *s = ctx->priv;
     const enum AVPixelFormat *pix_fmts;
 
     switch (s->out.format) {
@@ -305,7 +307,7 @@ static int query_formats(AVFilterContext *ctx)
         pix_fmts = other_pix_fmts;
     }
 
-    return ff_set_common_formats_from_list(ctx, pix_fmts);
+    return ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, pix_fmts);
 }
 
 static inline uint8_t ana_convert(const int *coeff, const uint8_t *left, const uint8_t *right)
@@ -1116,7 +1118,7 @@ const AVFilter ff_vf_stereo3d = {
     .uninit        = uninit,
     FILTER_INPUTS(stereo3d_inputs),
     FILTER_OUTPUTS(stereo3d_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_QUERY_FUNC2(query_formats),
     .priv_class    = &stereo3d_class,
     .flags         = AVFILTER_FLAG_SLICE_THREADS,
 };



More information about the ffmpeg-cvslog mailing list