From 6929fc88455390285645df70df058b0675b758db Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 7 Oct 2024 16:02:15 +0200 Subject: [PATCH] lavfi/vf_hwupload_cuda: switch to query_func2() --- libavfilter/vf_hwupload_cuda.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_hwupload_cuda.c b/libavfilter/vf_hwupload_cuda.c index 1d04045551..1b99b3fa60 100644 --- a/libavfilter/vf_hwupload_cuda.c +++ b/libavfilter/vf_hwupload_cuda.c @@ -52,7 +52,9 @@ static av_cold void cudaupload_uninit(AVFilterContext *ctx) av_buffer_unref(&s->hwdevice); } -static int cudaupload_query_formats(AVFilterContext *ctx) +static int cudaupload_query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { int ret; @@ -71,13 +73,13 @@ static int cudaupload_query_formats(AVFilterContext *ctx) AVFilterFormats *in_fmts = ff_make_format_list(input_pix_fmts); AVFilterFormats *out_fmts; - ret = ff_formats_ref(in_fmts, &ctx->inputs[0]->outcfg.formats); + ret = ff_formats_ref(in_fmts, &cfg_in[0]->formats); if (ret < 0) return ret; out_fmts = ff_make_format_list(output_pix_fmts); - ret = ff_formats_ref(out_fmts, &ctx->outputs[0]->incfg.formats); + ret = ff_formats_ref(out_fmts, &cfg_out[0]->formats); if (ret < 0) return ret; @@ -196,7 +198,7 @@ const AVFilter ff_vf_hwupload_cuda = { FILTER_INPUTS(cudaupload_inputs), FILTER_OUTPUTS(cudaupload_outputs), - FILTER_QUERY_FUNC(cudaupload_query_formats), + FILTER_QUERY_FUNC2(cudaupload_query_formats), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, };