lavfi/vf_hwupload_cuda: switch to query_func2()

This commit is contained in:
Anton Khirnov 2024-10-07 16:02:15 +02:00
parent 848256677d
commit 6929fc8845
1 changed files with 6 additions and 4 deletions

View File

@ -52,7 +52,9 @@ static av_cold void cudaupload_uninit(AVFilterContext *ctx)
av_buffer_unref(&s->hwdevice); 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; int ret;
@ -71,13 +73,13 @@ static int cudaupload_query_formats(AVFilterContext *ctx)
AVFilterFormats *in_fmts = ff_make_format_list(input_pix_fmts); AVFilterFormats *in_fmts = ff_make_format_list(input_pix_fmts);
AVFilterFormats *out_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) if (ret < 0)
return ret; return ret;
out_fmts = ff_make_format_list(output_pix_fmts); 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) if (ret < 0)
return ret; return ret;
@ -196,7 +198,7 @@ const AVFilter ff_vf_hwupload_cuda = {
FILTER_INPUTS(cudaupload_inputs), FILTER_INPUTS(cudaupload_inputs),
FILTER_OUTPUTS(cudaupload_outputs), FILTER_OUTPUTS(cudaupload_outputs),
FILTER_QUERY_FUNC(cudaupload_query_formats), FILTER_QUERY_FUNC2(cudaupload_query_formats),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}; };