avfilter/vf_overlay_cuda: Store format in filter, remove query func

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 22:52:39 +02:00
parent ad838ca297
commit 16b3be4989

View File

@ -414,18 +414,6 @@ static int overlay_cuda_activate(AVFilterContext *avctx)
return ff_framesync_activate(&ctx->fs);
}
/**
* Query formats
*/
static int overlay_cuda_query_formats(AVFilterContext *avctx)
{
static const enum AVPixelFormat pixel_formats[] = {
AV_PIX_FMT_CUDA, AV_PIX_FMT_NONE,
};
return ff_set_common_formats_from_list(avctx, pixel_formats);
}
/**
* Configure output
*/
@ -585,7 +573,7 @@ const AVFilter ff_vf_overlay_cuda = {
.activate = &overlay_cuda_activate,
FILTER_INPUTS(overlay_cuda_inputs),
FILTER_OUTPUTS(overlay_cuda_outputs),
FILTER_QUERY_FUNC(&overlay_cuda_query_formats),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA),
.preinit = overlay_cuda_framesync_preinit,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
};