diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-09-27 16:53:32 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-10-05 18:58:25 +0200 |
commit | 46c1c6beb905e7d436a7d9ef8e12aab64844462b (patch) | |
tree | 82cc92646e5a3d025ba9c7fc30d953707ee2f837 | |
parent | 98e7992acf72065e49a875f20209e89499a2c1c3 (diff) | |
download | ffmpeg-46c1c6beb905e7d436a7d9ef8e12aab64844462b.tar.gz |
avfilter/vf_xmedian: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavfilter/vf_xmedian.c | 8 |
1 files 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, |