From 90daa728d89dad3258ab80e4267cdf86130d6382 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 27 Sep 2021 16:48:28 +0200 Subject: [PATCH] avfilter/vsrc_gradients: Use formats list instead of query function Signed-off-by: Andreas Rheinhardt --- libavfilter/vsrc_gradients.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/libavfilter/vsrc_gradients.c b/libavfilter/vsrc_gradients.c index 5563d832d9..b976f7f826 100644 --- a/libavfilter/vsrc_gradients.c +++ b/libavfilter/vsrc_gradients.c @@ -83,17 +83,6 @@ static const AVOption gradients_options[] = { AVFILTER_DEFINE_CLASS(gradients); -static int query_formats(AVFilterContext *ctx) -{ - static const enum AVPixelFormat pix_fmts[] = { - AV_PIX_FMT_RGBA, - AV_PIX_FMT_RGBA64, - AV_PIX_FMT_NONE - }; - - return ff_set_common_formats_from_list(ctx, pix_fmts); -} - static uint32_t lerp_color(uint8_t c0[4], uint8_t c1[4], float x) { const float y = 1.f - x; @@ -301,7 +290,7 @@ const AVFilter ff_vsrc_gradients = { .priv_class = &gradients_class, .inputs = NULL, FILTER_OUTPUTS(gradients_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_PIXFMTS(AV_PIX_FMT_RGBA, AV_PIX_FMT_RGBA64), .activate = activate, .flags = AVFILTER_FLAG_SLICE_THREADS, };