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

Anton Khirnov git at videolan.org
Tue Oct 15 11:44:56 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Oct 12 18:28:12 2024 +0200| [18e43c2d3961e9bf2ab818a13a703aa1cc3902c8] | committer: Anton Khirnov

lavfi/vf_palettegen: switch to query_func2()

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

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

diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c
index 666bb6e349..d1ac5fcf34 100644
--- a/libavfilter/vf_palettegen.c
+++ b/libavfilter/vf_palettegen.c
@@ -100,15 +100,17 @@ static const AVOption palettegen_options[] = {
 
 AVFILTER_DEFINE_CLASS(palettegen);
 
-static int query_formats(AVFilterContext *ctx)
+static int query_formats(const AVFilterContext *ctx,
+                         AVFilterFormatsConfig **cfg_in,
+                         AVFilterFormatsConfig **cfg_out)
 {
     static const enum AVPixelFormat in_fmts[]  = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE};
     static const enum AVPixelFormat out_fmts[] = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE};
     int ret;
 
-    if ((ret = ff_formats_ref(ff_make_format_list(in_fmts) , &ctx->inputs[0]->outcfg.formats)) < 0)
+    if ((ret = ff_formats_ref(ff_make_format_list(in_fmts) , &cfg_in[0]->formats)) < 0)
         return ret;
-    if ((ret = ff_formats_ref(ff_make_format_list(out_fmts), &ctx->outputs[0]->incfg.formats)) < 0)
+    if ((ret = ff_formats_ref(ff_make_format_list(out_fmts), &cfg_out[0]->formats)) < 0)
         return ret;
     return 0;
 }
@@ -579,6 +581,6 @@ const AVFilter ff_vf_palettegen = {
     .uninit        = uninit,
     FILTER_INPUTS(palettegen_inputs),
     FILTER_OUTPUTS(palettegen_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_QUERY_FUNC2(query_formats),
     .priv_class    = &palettegen_class,
 };



More information about the ffmpeg-cvslog mailing list