[FFmpeg-devel] [PATCH 055/218] avfilter/vf_amplify: Use formats list instead of query function
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Thu Sep 30 16:39:56 EEST 2021
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavfilter/vf_amplify.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/libavfilter/vf_amplify.c b/libavfilter/vf_amplify.c
index 558cbd918e..ed7dd80b5c 100644
--- a/libavfilter/vf_amplify.c
+++ b/libavfilter/vf_amplify.c
@@ -50,8 +50,6 @@ typedef struct AmplifyContext {
AVFrame **frames;
} AmplifyContext;
-static int query_formats(AVFilterContext *ctx)
-{
static const enum AVPixelFormat pixel_fmts[] = {
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9,
AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY14,
@@ -78,8 +76,6 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
AV_PIX_FMT_NONE
};
- return ff_set_common_formats_from_list(ctx, pixel_fmts);
-}
static av_cold int init(AVFilterContext *ctx)
{
@@ -316,7 +312,7 @@ const AVFilter ff_vf_amplify = {
.priv_class = &lify_class,
FILTER_OUTPUTS(outputs),
FILTER_INPUTS(inputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_PIXFMTS_ARRAY(pixel_fmts),
.init = init,
.uninit = uninit,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS,
--
2.30.2
More information about the ffmpeg-devel
mailing list