diff mbox series

[FFmpeg-devel,107/218] avfilter/vf_spp: Use formats list instead of query function

Message ID PR3PR03MB66652148F90B0CE27A3ABE758FAA9@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit fb1a3d05a9343ef5408818b70a13d3309cae5fe2
Headers show
Series [FFmpeg-devel,001/218] avfilter/f_reverse: Don't use redundant query_formats function | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 30, 2021, 1:40 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_spp.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c
index 32a3c59987..e0a02ea65f 100644
--- a/libavfilter/vf_spp.c
+++ b/libavfilter/vf_spp.c
@@ -310,8 +310,6 @@  static void filter(SPPContext *p, uint8_t *dst, uint8_t *src,
     }
 }
 
-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,
@@ -329,9 +327,6 @@  static int query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_NONE
     };
 
-    return ff_set_common_formats_from_list(ctx, pix_fmts);
-}
-
 static int config_input(AVFilterLink *inlink)
 {
     SPPContext *s = inlink->dst->priv;
@@ -503,7 +498,7 @@  const AVFilter ff_vf_spp = {
     .uninit          = uninit,
     FILTER_INPUTS(spp_inputs),
     FILTER_OUTPUTS(spp_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_PIXFMTS_ARRAY(pix_fmts),
     .process_command = process_command,
     .priv_class      = &spp_class,
     .flags           = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,