summaryrefslogtreecommitdiff
path: root/libavfilter/avf_concat.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-11 22:02:44 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-22 16:13:56 +0200
commitfbfcb012aca8259dd1c03ce3bf3aff1878b630e6 (patch)
tree525e93ad674d8c218109a7446bd59111fcb491f5 /libavfilter/avf_concat.c
parentf28db2ca277ac24fd549a6ab9beaf46872848df1 (diff)
downloadffmpeg-fbfcb012aca8259dd1c03ce3bf3aff1878b630e6.tar.gz
avfilter/avf_concat: Free pads' names generically
Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/avf_concat.c')
-rw-r--r--libavfilter/avf_concat.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c
index 10f21cecb7..2ae24e9b39 100644
--- a/libavfilter/avf_concat.c
+++ b/libavfilter/avf_concat.c
@@ -319,10 +319,8 @@ static av_cold int init(AVFilterContext *ctx)
else
pad.get_buffer.audio = get_audio_buffer;
pad.name = av_asprintf("in%d:%c%d", seg, "va"[type], str);
- if ((ret = ff_append_inpad(ctx, &pad)) < 0) {
- av_freep(&pad.name);
+ if ((ret = ff_append_inpad_free_name(ctx, &pad)) < 0)
return ret;
- }
}
}
}
@@ -334,10 +332,8 @@ static av_cold int init(AVFilterContext *ctx)
.config_props = config_output,
};
pad.name = av_asprintf("out:%c%d", "va"[type], str);
- if ((ret = ff_append_outpad(ctx, &pad)) < 0) {
- av_freep(&pad.name);
+ if ((ret = ff_append_outpad_free_name(ctx, &pad)) < 0)
return ret;
- }
}
}
@@ -351,12 +347,7 @@ static av_cold int init(AVFilterContext *ctx)
static av_cold void uninit(AVFilterContext *ctx)
{
ConcatContext *cat = ctx->priv;
- unsigned i;
- for (i = 0; i < ctx->nb_inputs; i++)
- av_freep(&ctx->input_pads[i].name);
- for (i = 0; i < ctx->nb_outputs; i++)
- av_freep(&ctx->output_pads[i].name);
av_freep(&cat->in);
}