From 505072e80938d9310ab82f442a629508dcef4c32 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 27 Sep 2021 22:05:25 +0200 Subject: [PATCH] avfilter/vf_drawbox: Use formats list instead of query function Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_drawbox.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c index c5ced11bbe..1d05347b16 100644 --- a/libavfilter/vf_drawbox.c +++ b/libavfilter/vf_drawbox.c @@ -183,8 +183,6 @@ static av_cold int init(AVFilterContext *ctx) return 0; } -static int query_formats(AVFilterContext *ctx) -{ static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, @@ -193,8 +191,6 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P, AV_PIX_FMT_NONE }; - return ff_set_common_formats_from_list(ctx, pix_fmts); -} static int config_input(AVFilterLink *inlink) { @@ -405,7 +401,7 @@ const AVFilter ff_vf_drawbox = { .init = init, FILTER_INPUTS(drawbox_inputs), FILTER_OUTPUTS(drawbox_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_PIXFMTS_ARRAY(pix_fmts), .process_command = process_command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; @@ -487,7 +483,7 @@ const AVFilter ff_vf_drawgrid = { .init = init, FILTER_INPUTS(drawgrid_inputs), FILTER_OUTPUTS(drawgrid_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_PIXFMTS_ARRAY(pix_fmts), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, };