diff mbox series

[FFmpeg-devel,07/23] avfilter/af_join: Free inpads' names generically

Message ID PR3PR03MB666552794C86FEDD37A99F3E8FF99@PR3PR03MB6665.eurprd03.prod.outlook.com
State Superseded
Headers show
Series [FFmpeg-devel,01/23] avfilter/vf_(guided|program_opencl): Add missing dynamic inputs flag | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 12, 2021, 1:43 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/af_join.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index 6a4b449021..1fb216f622 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -194,10 +194,8 @@  static av_cold int join_init(AVFilterContext *ctx)
         if (!pad.name)
             return AVERROR(ENOMEM);
 
-        if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) {
-            av_freep(&pad.name);
+        if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0)
             return ret;
-        }
     }
 
     return 0;
@@ -212,10 +210,6 @@  static av_cold void join_uninit(AVFilterContext *ctx)
         av_frame_free(&s->input_frames[i]);
     }
 
-    for (i = 0; i < ctx->nb_inputs; i++) {
-        av_freep(&ctx->input_pads[i].name);
-    }
-
     av_freep(&s->channels);
     av_freep(&s->buffers);
     av_freep(&s->input_frames);
@@ -552,4 +546,5 @@  const AVFilter ff_af_join = {
     .inputs         = NULL,
     .outputs        = avfilter_af_join_outputs,
     .flags          = AVFILTER_FLAG_DYNAMIC_INPUTS,
+    .flags_internal = FF_FILTER_FLAG_FREE_INPADS,
 };