@@ -191,10 +191,8 @@ static av_cold int init(AVFilterContext *ctx)
return AVERROR(ENOMEM);
pad.name = name;
- if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0) {
- av_freep(&pad.name);
+ if ((ret = ff_insert_outpad(ctx, i, &pad)) < 0)
return ret;
- }
}
return ret;
@@ -550,13 +548,9 @@ fail:
static av_cold void uninit(AVFilterContext *ctx)
{
AudioCrossoverContext *s = ctx->priv;
- int i;
av_freep(&s->fdsp);
av_frame_free(&s->xover);
-
- for (i = 0; i < ctx->nb_outputs; i++)
- av_freep(&ctx->output_pads[i].name);
}
static const AVFilterPad inputs[] = {
@@ -581,4 +575,5 @@ const AVFilter ff_af_acrossover = {
.outputs = NULL,
.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS |
AVFILTER_FLAG_SLICE_THREADS,
+ .flags_internal = FF_FILTER_FLAG_FREE_OUTPADS,
};
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavfilter/af_acrossover.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)