[FFmpeg-devel] [PATCH 09/23] avfilter/af_lv2: Free inpads' names generically
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Thu Aug 12 04:43:43 EEST 2021
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavfilter/af_lv2.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/libavfilter/af_lv2.c b/libavfilter/af_lv2.c
index 28b729691d..d97367ca99 100644
--- a/libavfilter/af_lv2.c
+++ b/libavfilter/af_lv2.c
@@ -393,7 +393,7 @@ static av_cold int init(AVFilterContext *ctx)
const LilvPlugin *plugin;
AVFilterPad pad = { NULL };
LilvNode *uri;
- int i;
+ int i, ret;
s->world = lilv_world_new();
if (!s->world)
@@ -464,10 +464,8 @@ static av_cold int init(AVFilterContext *ctx)
return AVERROR(ENOMEM);
pad.filter_frame = filter_frame;
- if (ff_insert_inpad(ctx, ctx->nb_inputs, &pad) < 0) {
- av_freep(&pad.name);
- return AVERROR(ENOMEM);
- }
+ if ((ret = ff_insert_inpad(ctx, ctx->nb_inputs, &pad)) < 0)
+ return ret;
}
return 0;
@@ -572,9 +570,6 @@ static av_cold void uninit(AVFilterContext *ctx)
av_freep(&s->maxes);
av_freep(&s->controls);
av_freep(&s->seq_out);
-
- if (ctx->nb_inputs)
- av_freep(&ctx->input_pads[0].name);
}
static const AVFilterPad lv2_outputs[] = {
@@ -598,4 +593,5 @@ const AVFilter ff_af_lv2 = {
.inputs = 0,
.outputs = lv2_outputs,
.flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
+ .flags_internal = FF_FILTER_FLAG_FREE_INPADS,
};
--
2.30.2
More information about the ffmpeg-devel
mailing list