avfilter/vf_scale_qsv: Use formats list instead of query function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 22:49:13 +02:00
parent b3ab22d88b
commit 6c73543623
1 changed files with 1 additions and 10 deletions

View File

@ -156,15 +156,6 @@ static av_cold void qsvscale_uninit(AVFilterContext *ctx)
s->nb_surface_ptrs_out = 0;
}
static int qsvscale_query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pixel_formats[] = {
AV_PIX_FMT_QSV, AV_PIX_FMT_NONE,
};
return ff_set_common_formats_from_list(ctx, pixel_formats);
}
static int init_out_pool(AVFilterContext *ctx,
int out_width, int out_height)
{
@ -678,7 +669,7 @@ const AVFilter ff_vf_scale_qsv = {
FILTER_INPUTS(qsvscale_inputs),
FILTER_OUTPUTS(qsvscale_outputs),
FILTER_QUERY_FUNC(qsvscale_query_formats),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_QSV),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
};