Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-11 23:02:44 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-08-22 17:14:10 +0300
commita79852f1c14aec91be999beb3f23473556321a35 (patch)
treeb8d4cc6a7d1b1518fe09c82c7b5b51ccd00ff1b0 /libavfilter/f_streamselect.c
parent64133506f7894a93bbd143b54224a6e85cdb59fe (diff)
avfilter/f_streamselect: Free pads' names generically
Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/f_streamselect.c')
-rw-r--r--libavfilter/f_streamselect.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/libavfilter/f_streamselect.c b/libavfilter/f_streamselect.c
index da2391898f..c5427672e2 100644
--- a/libavfilter/f_streamselect.c
+++ b/libavfilter/f_streamselect.c
@@ -167,16 +167,13 @@ static int parse_definition(AVFilterContext *ctx, int nb_pads, int is_input, int
av_log(ctx, AV_LOG_DEBUG, "Add %s pad %s\n", padtype, pad.name);
if (is_input) {
- ret = ff_append_inpad(ctx, &pad);
+ ret = ff_append_inpad_free_name(ctx, &pad);
} else {
pad.config_props = config_output;
- ret = ff_append_outpad(ctx, &pad);
+ ret = ff_append_outpad_free_name(ctx, &pad);
}
-
- if (ret < 0) {
- av_freep(&pad.name);
+ if (ret < 0)
return ret;
- }
}
return 0;
@@ -295,12 +292,6 @@ static av_cold void uninit(AVFilterContext *ctx)
av_freep(&s->map);
av_freep(&s->frames);
ff_framesync_uninit(&s->fs);
-
- for (int i = 0; i < ctx->nb_inputs; i++)
- av_freep(&ctx->input_pads[i].name);
-
- for (int i = 0; i < ctx->nb_outputs; i++)
- av_freep(&ctx->output_pads[i].name);
}
static int query_formats(AVFilterContext *ctx)