From ab01f0522bb79ec69a0b1f488a9896158e2a86ce Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 15 Oct 2024 11:24:35 +0200 Subject: [PATCH] lavfi/vf_vpp_qsv: convert to query_func2() --- libavfilter/vf_vpp_qsv.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 7f05f1fab0..37d41aa44b 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -932,9 +932,11 @@ static const AVOption vpp_options[] = { { NULL } }; -static int vpp_query_formats(AVFilterContext *ctx) +static int vpp_query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { - VPPContext *vpp = ctx->priv; + const VPPContext *vpp = ctx->priv; int ret, i = 0; static const enum AVPixelFormat in_pix_fmts[] = { AV_PIX_FMT_YUV420P, @@ -951,7 +953,7 @@ static int vpp_query_formats(AVFilterContext *ctx) static enum AVPixelFormat out_pix_fmts[4]; ret = ff_formats_ref(ff_make_format_list(in_pix_fmts), - &ctx->inputs[0]->outcfg.formats); + &cfg_in[0]->formats); if (ret < 0) return ret; @@ -968,10 +970,10 @@ static int vpp_query_formats(AVFilterContext *ctx) out_pix_fmts[i++] = AV_PIX_FMT_NONE; return ff_formats_ref(ff_make_format_list(out_pix_fmts), - &ctx->outputs[0]->incfg.formats); + &cfg_out[0]->formats); } -DEFINE_QSV_FILTER(vpp, vpp, "VPP", FILTER_QUERY_FUNC(vpp_query_formats)); +DEFINE_QSV_FILTER(vpp, vpp, "VPP", FILTER_QUERY_FUNC2(vpp_query_formats)); #endif