[FFmpeg-devel] [PATCH 05/23] avfilter/af_amerge: Free inpads' names generically
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Thu Aug 12 04:43:39 EEST 2021
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavfilter/af_amerge.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c
index 2e45b7c277..1b7c6dd2f4 100644
--- a/libavfilter/af_amerge.c
+++ b/libavfilter/af_amerge.c
@@ -60,8 +60,6 @@ static av_cold void uninit(AVFilterContext *ctx)
AMergeContext *s = ctx->priv;
av_freep(&s->in);
- for (unsigned i = 0; i < ctx->nb_inputs; i++)
- av_freep(&ctx->input_pads[i].name);
}
static int query_formats(AVFilterContext *ctx)
@@ -330,10 +328,8 @@ static av_cold int init(AVFilterContext *ctx)
};
if (!name)
return AVERROR(ENOMEM);
- if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) {
- av_freep(&pad.name);
+ if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0)
return ret;
- }
}
return 0;
}
@@ -360,4 +356,5 @@ const AVFilter ff_af_amerge = {
.outputs = amerge_outputs,
.priv_class = &amerge_class,
.flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
+ .flags_internal = FF_FILTER_FLAG_FREE_INPADS,
};
--
2.30.2
More information about the ffmpeg-devel
mailing list