[FFmpeg-devel] [PATCH 087/218] avfilter/vf_xmedian: Use formats list instead of query function
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Thu Sep 30 16:40:28 EEST 2021
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavfilter/vf_xmedian.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/libavfilter/vf_xmedian.c b/libavfilter/vf_xmedian.c
index 2ae4132b44..04d807527e 100644
--- a/libavfilter/vf_xmedian.c
+++ b/libavfilter/vf_xmedian.c
@@ -55,8 +55,6 @@ typedef struct XMedianContext {
int (*median_frames)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
} XMedianContext;
-static int query_formats(AVFilterContext *ctx)
-{
static const enum AVPixelFormat pixel_fmts[] = {
AV_PIX_FMT_GRAY8,
AV_PIX_FMT_GRAY9,
@@ -86,8 +84,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)
{
@@ -396,7 +392,7 @@ const AVFilter ff_vf_xmedian = {
.priv_size = sizeof(XMedianContext),
.priv_class = &xmedian_class,
FILTER_OUTPUTS(outputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_PIXFMTS_ARRAY(pixel_fmts),
.preinit = xmedian_framesync_preinit,
.init = xmedian_init,
.uninit = uninit,
@@ -480,7 +476,7 @@ const AVFilter ff_vf_tmedian = {
.priv_class = &tmedian_class,
FILTER_INPUTS(tmedian_inputs),
FILTER_OUTPUTS(tmedian_outputs),
- 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