mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
lavfi/vf_hwupload_cuda: switch to query_func2()
This commit is contained in:
parent
848256677d
commit
6929fc8845
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user