diff mbox series

[FFmpeg-devel,061/218] avfilter/vf_colorkey: Use formats list instead of query func

Message ID PR3PR03MB6665B1BB00AAFE21176033318FAA9@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit 5ee2bd6e8bc1a19318a4dd627da8823711fc3f42
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_colorkey.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/vf_colorkey.c b/libavfilter/vf_colorkey.c
index 93f2ae3ec9..6720be13d6 100644
--- a/libavfilter/vf_colorkey.c
+++ b/libavfilter/vf_colorkey.c
@@ -159,8 +159,6 @@  static av_cold int config_output(AVFilterLink *outlink)
     return 0;
 }
 
-static av_cold int query_formats(AVFilterContext *avctx)
-{
     static const enum AVPixelFormat pixel_fmts[] = {
         AV_PIX_FMT_ARGB,
         AV_PIX_FMT_RGBA,
@@ -169,9 +167,6 @@  static av_cold int query_formats(AVFilterContext *avctx)
         AV_PIX_FMT_NONE
     };
 
-    return ff_set_common_formats_from_list(avctx, pixel_fmts);
-}
-
 static const AVFilterPad colorkey_inputs[] = {
     {
         .name = "default",
@@ -211,7 +206,7 @@  const AVFilter ff_vf_colorkey = {
     .init          = init_filter,
     FILTER_INPUTS(colorkey_inputs),
     FILTER_OUTPUTS(colorkey_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_PIXFMTS_ARRAY(pixel_fmts),
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
     .process_command = ff_filter_process_command,
 };
@@ -236,7 +231,7 @@  const AVFilter ff_vf_colorhold = {
     .init          = init_filter,
     FILTER_INPUTS(colorkey_inputs),
     FILTER_OUTPUTS(colorkey_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_PIXFMTS_ARRAY(pixel_fmts),
     .flags         = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
     .process_command = ff_filter_process_command,
 };