diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-11 22:02:44 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-08-22 16:13:50 +0200 |
commit | 7670e24eb015f6526497c310ebc0d2efc28fb2d6 (patch) | |
tree | 5080d1b617e60b1e53c9fd01327152158c4967c3 /libavfilter | |
parent | d2e72473dffb4090c4568a21fcdcc8f709a17c80 (diff) | |
download | ffmpeg-7670e24eb015f6526497c310ebc0d2efc28fb2d6.tar.gz |
avfilter/af_ladspa: Free inpad's name generically
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_ladspa.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c index 9186b75957..73cbd288c0 100644 --- a/libavfilter/af_ladspa.c +++ b/libavfilter/af_ladspa.c @@ -456,7 +456,7 @@ static av_cold int init(AVFilterContext *ctx) AVFilterPad pad = { NULL }; char *p, *arg, *saveptr = NULL; unsigned long nb_ports; - int i, j = 0; + int i, j = 0, ret; if (!s->dl_name) { av_log(ctx, AV_LOG_ERROR, "No plugin name provided\n"); @@ -639,10 +639,8 @@ static av_cold int init(AVFilterContext *ctx) pad.filter_frame = filter_frame; pad.config_props = config_input; - if (ff_append_inpad(ctx, &pad) < 0) { - av_freep(&pad.name); - return AVERROR(ENOMEM); - } + if ((ret = ff_append_inpad_free_name(ctx, &pad)) < 0) + return ret; } av_log(ctx, AV_LOG_DEBUG, "ports: %lu\n", nb_ports); @@ -750,9 +748,6 @@ static av_cold void uninit(AVFilterContext *ctx) av_freep(&s->octlv); av_freep(&s->handles); av_freep(&s->ctl_needs_value); - - if (ctx->nb_inputs) - av_freep(&ctx->input_pads[0].name); } static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, |