avfilter/vf_xmedian: Deduplicate outputs

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2023-11-01 09:05:32 +01:00
parent 93abb9b560
commit 748c168f8e

View File

@ -327,6 +327,14 @@ static int activate(AVFilterContext *ctx)
return ff_framesync_activate(&s->fs); return ff_framesync_activate(&s->fs);
} }
static const AVFilterPad outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output,
},
};
#if CONFIG_XMEDIAN_FILTER #if CONFIG_XMEDIAN_FILTER
static av_cold int xmedian_init(AVFilterContext *ctx) static av_cold int xmedian_init(AVFilterContext *ctx)
{ {
@ -363,14 +371,6 @@ static const AVOption xmedian_options[] = {
{ NULL }, { NULL },
}; };
static const AVFilterPad outputs[] = {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_output,
},
};
FRAMESYNC_DEFINE_CLASS(xmedian, XMedianContext, fs); FRAMESYNC_DEFINE_CLASS(xmedian, XMedianContext, fs);
const AVFilter ff_vf_xmedian = { 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); AVFILTER_DEFINE_CLASS(tmedian);
const AVFilter ff_vf_tmedian = { const AVFilter ff_vf_tmedian = {
@ -464,7 +456,7 @@ const AVFilter ff_vf_tmedian = {
.priv_size = sizeof(XMedianContext), .priv_size = sizeof(XMedianContext),
.priv_class = &tmedian_class, .priv_class = &tmedian_class,
FILTER_INPUTS(tmedian_inputs), FILTER_INPUTS(tmedian_inputs),
FILTER_OUTPUTS(tmedian_outputs), FILTER_OUTPUTS(outputs),
FILTER_PIXFMTS_ARRAY(pixel_fmts), FILTER_PIXFMTS_ARRAY(pixel_fmts),
.init = init, .init = init,
.uninit = uninit, .uninit = uninit,