[FFmpeg-cvslog] avfilter/af_amerge: Free inpads' names generically

Andreas Rheinhardt git at videolan.org
Sun Aug 22 19:06:19 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Aug 11 22:02:44 2021 +0200| [414c1b9b62f364c5d02714f4d1234a77442d8261] | committer: Andreas Rheinhardt

avfilter/af_amerge: Free inpads' names generically

Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=414c1b9b62f364c5d02714f4d1234a77442d8261
---

 libavfilter/af_amerge.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c
index 0e8bdea436..d67e3d7e32 100644
--- a/libavfilter/af_amerge.c
+++ b/libavfilter/af_amerge.c
@@ -60,8 +60,6 @@ static av_cold void uninit(AVFilterContext *ctx)
     AMergeContext *s = ctx->priv;
 
     av_freep(&s->in);
-    for (unsigned i = 0; i < ctx->nb_inputs; i++)
-        av_freep(&ctx->input_pads[i].name);
 }
 
 static int query_formats(AVFilterContext *ctx)
@@ -328,10 +326,8 @@ static av_cold int init(AVFilterContext *ctx)
         };
         if (!name)
             return AVERROR(ENOMEM);
-        if ((ret = ff_append_inpad(ctx, &pad)) < 0) {
-            av_freep(&pad.name);
+        if ((ret = ff_append_inpad_free_name(ctx, &pad)) < 0)
             return ret;
-        }
     }
     return 0;
 }



More information about the ffmpeg-cvslog mailing list