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, };