1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

avfilter/f_streamselect: Free pads' names generically

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2021-08-11 22:02:44 +02:00
parent 64133506f7
commit a79852f1c1

View File

@@ -167,17 +167,14 @@ 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); av_log(ctx, AV_LOG_DEBUG, "Add %s pad %s\n", padtype, pad.name);
if (is_input) { if (is_input) {
ret = ff_append_inpad(ctx, &pad); ret = ff_append_inpad_free_name(ctx, &pad);
} else { } else {
pad.config_props = config_output; pad.config_props = config_output;
ret = ff_append_outpad(ctx, &pad); ret = ff_append_outpad_free_name(ctx, &pad);
} }
if (ret < 0)
if (ret < 0) {
av_freep(&pad.name);
return ret; return ret;
} }
}
return 0; return 0;
} }
@@ -295,12 +292,6 @@ static av_cold void uninit(AVFilterContext *ctx)
av_freep(&s->map); av_freep(&s->map);
av_freep(&s->frames); av_freep(&s->frames);
ff_framesync_uninit(&s->fs); 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) static int query_formats(AVFilterContext *ctx)