[FFmpeg-devel] [PATCH 5/6] avfilter/af_acrossover: Free outpads' names generically
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Tue Aug 17 04:53:57 EEST 2021
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavfilter/af_acrossover.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c
index 1ad7ebad01..0ee9b47be5 100644
--- a/libavfilter/af_acrossover.c
+++ b/libavfilter/af_acrossover.c
@@ -191,10 +191,8 @@ static av_cold int init(AVFilterContext *ctx)
return AVERROR(ENOMEM);
pad.name = name;
- if ((ret = ff_insert_outpad(ctx, &pad)) < 0) {
- av_freep(&pad.name);
+ if ((ret = ff_insert_outpad(ctx, &pad)) < 0)
return ret;
- }
}
return ret;
@@ -539,13 +537,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[] = {
@@ -570,4 +564,5 @@ const AVFilter ff_af_acrossover = {
.outputs = NULL,
.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS |
AVFILTER_FLAG_SLICE_THREADS,
+ .flags_internal = FF_FILTER_FLAG_FREE_OUTPADS,
};
--
2.30.2
More information about the ffmpeg-devel
mailing list