From 4e66d0c5d05701dbde7ef439cff733f1aab57fa8 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 1 Oct 2024 12:02:29 +0200 Subject: [PATCH] lavfi/f_drawgraph: switch to query_func2() --- libavfilter/f_drawgraph.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libavfilter/f_drawgraph.c b/libavfilter/f_drawgraph.c index 7c6a83be7d..24288a1175 100644 --- a/libavfilter/f_drawgraph.c +++ b/libavfilter/f_drawgraph.c @@ -127,9 +127,10 @@ 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) { - AVFilterLink *outlink = ctx->outputs[0]; static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_RGBA, AV_PIX_FMT_NONE @@ -137,7 +138,7 @@ static int query_formats(AVFilterContext *ctx) int ret; AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts); - if ((ret = ff_formats_ref(fmts_list, &outlink->incfg.formats)) < 0) + if ((ret = ff_formats_ref(fmts_list, &cfg_out[0]->formats)) < 0) return ret; return 0; @@ -482,7 +483,7 @@ const AVFilter ff_vf_drawgraph = { .uninit = uninit, FILTER_INPUTS(drawgraph_inputs), FILTER_OUTPUTS(drawgraph_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), }; #endif // CONFIG_DRAWGRAPH_FILTER @@ -506,6 +507,6 @@ const AVFilter ff_avf_adrawgraph = { .uninit = uninit, FILTER_INPUTS(adrawgraph_inputs), FILTER_OUTPUTS(drawgraph_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), }; #endif // CONFIG_ADRAWGRAPH_FILTER