[FFmpeg-devel] [PATCH 061/218] avfilter/vf_colorkey: Use formats list instead of query func
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Thu Sep 30 16:40:02 EEST 2021
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavfilter/vf_colorkey.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
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,
};
--
2.30.2
More information about the ffmpeg-devel
mailing list