From 28a43cf7feac6c96017b29626eb46d946aebbbe6 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 19 Nov 2023 23:53:02 +0100 Subject: [PATCH] avfilter/af_afir: no need to dynamically add outpad --- libavfilter/af_afir.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c index 7d670ddff2..6263734baa 100644 --- a/libavfilter/af_afir.c +++ b/libavfilter/af_afir.c @@ -616,16 +616,6 @@ static av_cold int init(AVFilterContext *ctx) return ret; } - pad = (AVFilterPad) { - .name = "default", - .type = AVMEDIA_TYPE_AUDIO, - .config_props = config_output, - }; - - ret = ff_append_outpad(ctx, &pad); - if (ret < 0) - return ret; - s->fdsp = avpriv_float_dsp_alloc(0); if (!s->fdsp) return AVERROR(ENOMEM); @@ -707,12 +697,21 @@ static const AVOption afir_options[] = { AVFILTER_DEFINE_CLASS(afir); +static const AVFilterPad outputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_AUDIO, + .config_props = config_output, + }, +}; + const AVFilter ff_af_afir = { .name = "afir", .description = NULL_IF_CONFIG_SMALL("Apply Finite Impulse Response filter with supplied coefficients in additional stream(s)."), .priv_size = sizeof(AudioFIRContext), .priv_class = &afir_class, FILTER_QUERY_FUNC(query_formats), + FILTER_OUTPUTS(outputs), .init = init, .activate = activate, .uninit = uninit,