From 8510758e1de6c2996b45925a9ce97b6387b5c616 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 27 Sep 2021 17:40:04 +0200 Subject: [PATCH] avfilter/vf_signalstats: Use formats list instead of query function Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_signalstats.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c index aa54543bcf..6714d6be06 100644 --- a/libavfilter/vf_signalstats.c +++ b/libavfilter/vf_signalstats.c @@ -116,8 +116,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_freep(&s->histsat); } -static int query_formats(AVFilterContext *ctx) -{ // TODO: add more static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, @@ -134,9 +132,6 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_NONE }; - return ff_set_common_formats_from_list(ctx, pix_fmts); -} - static AVFrame *alloc_frame(enum AVPixelFormat pixfmt, int w, int h) { AVFrame *frame = av_frame_alloc(); @@ -1015,7 +1010,7 @@ const AVFilter ff_vf_signalstats = { .priv_size = sizeof(SignalstatsContext), FILTER_INPUTS(signalstats_inputs), FILTER_OUTPUTS(signalstats_outputs), - FILTER_QUERY_FUNC(query_formats), + FILTER_PIXFMTS_ARRAY(pix_fmts), .priv_class = &signalstats_class, .flags = AVFILTER_FLAG_SLICE_THREADS, };