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:15:28 +0200 |
commit | 0ce19ecd2833080b3f6bd0d9d0838e4eccb8e792 (patch) | |
tree | 8fad99ba06a68d4a0e497a1f5da114040f1e1965 /libavfilter | |
parent | a79852f1c14aec91be999beb3f23473556321a35 (diff) | |
download | ffmpeg-0ce19ecd2833080b3f6bd0d9d0838e4eccb8e792.tar.gz |
avfilter/split: Free outpads' names 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/split.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/libavfilter/split.c b/libavfilter/split.c index a77ce6f6f1..b02584d0ab 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -56,23 +56,13 @@ static av_cold int split_init(AVFilterContext *ctx) if (!pad.name) return AVERROR(ENOMEM); - if ((ret = ff_append_outpad(ctx, &pad)) < 0) { - av_freep(&pad.name); + if ((ret = ff_append_outpad_free_name(ctx, &pad)) < 0) return ret; - } } return 0; } -static av_cold void split_uninit(AVFilterContext *ctx) -{ - int i; - - for (i = 0; i < ctx->nb_outputs; i++) - av_freep(&ctx->output_pads[i].name); -} - static int filter_frame(AVFilterLink *inlink, AVFrame *frame) { AVFilterContext *ctx = inlink->dst; @@ -124,7 +114,6 @@ const AVFilter ff_vf_split = { .priv_size = sizeof(SplitContext), .priv_class = &split_class, .init = split_init, - .uninit = split_uninit, FILTER_INPUTS(avfilter_vf_split_inputs), .outputs = NULL, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, @@ -144,7 +133,6 @@ const AVFilter ff_af_asplit = { .priv_size = sizeof(SplitContext), .priv_class = &asplit_class, .init = split_init, - .uninit = split_uninit, FILTER_INPUTS(avfilter_af_asplit_inputs), .outputs = NULL, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, |