[FFmpeg-cvslog] lavfi/vf_fade: switch to query_func2()

Anton Khirnov git at videolan.org
Mon Oct 7 11:57:43 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Oct  4 10:09:29 2024 +0200| [401130410275b74b62b4cec46c1b52383ee4280e] | committer: Anton Khirnov

lavfi/vf_fade: switch to query_func2()

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

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

diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index fb04c7ce32..39f16b0b3a 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -101,7 +101,9 @@ static av_cold int init(AVFilterContext *ctx)
     return 0;
 }
 
-static int query_formats(AVFilterContext *ctx)
+static int query_formats(const AVFilterContext *ctx,
+                         AVFilterFormatsConfig **cfg_in,
+                         AVFilterFormatsConfig **cfg_out)
 {
     const FadeContext *s = ctx->priv;
     static const enum AVPixelFormat pix_fmts[] = {
@@ -162,7 +164,7 @@ static int query_formats(AVFilterContext *ctx)
         else
             pixel_fmts = pix_fmts_rgb;
     }
-    return ff_set_common_formats_from_list(ctx, pixel_fmts);
+    return ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out, pixel_fmts);
 }
 
 const static enum AVPixelFormat studio_level_pix_fmts[] = {
@@ -566,7 +568,7 @@ const AVFilter ff_vf_fade = {
     .priv_class    = &fade_class,
     FILTER_INPUTS(avfilter_vf_fade_inputs),
     FILTER_OUTPUTS(ff_video_default_filterpad),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_QUERY_FUNC2(query_formats),
     .flags         = AVFILTER_FLAG_SLICE_THREADS |
                      AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
 };



More information about the ffmpeg-cvslog mailing list