From bdfdb255f1e20b494e0dde467dfe6ea86f497144 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 27 Sep 2021 21:18:23 +0200 Subject: [PATCH] avfilter/vf_ocr: Use formats list instead of query function Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_ocr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libavfilter/vf_ocr.c b/libavfilter/vf_ocr.c index bc088f0299..8952bd5d46 100644 --- a/libavfilter/vf_ocr.c +++ b/libavfilter/vf_ocr.c @@ -73,8 +73,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_GRAY8, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, @@ -87,9 +85,6 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_NONE }; - return ff_set_common_formats_from_list(ctx, pix_fmts); -} - static int filter_frame(AVFilterLink *inlink, AVFrame *in) { AVDictionary **metadata = &in->metadata; @@ -150,5 +145,5 @@ const AVFilter ff_vf_ocr = { .uninit = uninit, FILTER_INPUTS(ocr_inputs), FILTER_OUTPUTS(ocr_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_PIXFMTS_ARRAY(pix_fmts), };