From 748c168f8eabc1800c6096d521a3a32954b7b50f Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 1 Nov 2023 09:05:32 +0100 Subject: [PATCH] avfilter/vf_xmedian: Deduplicate outputs Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_xmedian.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/libavfilter/vf_xmedian.c b/libavfilter/vf_xmedian.c index 0a02ca065e..ebcbea97ed 100644 --- a/libavfilter/vf_xmedian.c +++ b/libavfilter/vf_xmedian.c @@ -327,6 +327,14 @@ static int activate(AVFilterContext *ctx) return ff_framesync_activate(&s->fs); } +static const AVFilterPad outputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_output, + }, +}; + #if CONFIG_XMEDIAN_FILTER static av_cold int xmedian_init(AVFilterContext *ctx) { @@ -363,14 +371,6 @@ static const AVOption xmedian_options[] = { { NULL }, }; -static const AVFilterPad outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_output, - }, -}; - FRAMESYNC_DEFINE_CLASS(xmedian, XMedianContext, fs); const AVFilter ff_vf_xmedian = { @@ -448,14 +448,6 @@ static const AVFilterPad tmedian_inputs[] = { }, }; -static const AVFilterPad tmedian_outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_output, - }, -}; - AVFILTER_DEFINE_CLASS(tmedian); const AVFilter ff_vf_tmedian = { @@ -464,7 +456,7 @@ const AVFilter ff_vf_tmedian = { .priv_size = sizeof(XMedianContext), .priv_class = &tmedian_class, FILTER_INPUTS(tmedian_inputs), - FILTER_OUTPUTS(tmedian_outputs), + FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), .init = init, .uninit = uninit,