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

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


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon Aug 16 21:39:50 2021 +0200| [c54c8836cf0ebd7b40f1ceb6c3da1acc583937b1] | committer: Andreas Rheinhardt

avfilter/af_afir: 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=c54c8836cf0ebd7b40f1ceb6c3da1acc583937b1
---

 libavfilter/af_afir.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c
index d3868a7f2e..b74e7ddfae 100644
--- a/libavfilter/af_afir.c
+++ b/libavfilter/af_afir.c
@@ -792,9 +792,6 @@ static av_cold void uninit(AVFilterContext *ctx)
         av_frame_free(&s->ir[i]);
     }
 
-    for (unsigned i = 1; i < ctx->nb_inputs; i++)
-        av_freep(&ctx->input_pads[i].name);
-
     av_frame_free(&s->video);
 }
 
@@ -849,11 +846,9 @@ static av_cold int init(AVFilterContext *ctx)
         if (!pad.name)
             return AVERROR(ENOMEM);
 
-        ret = ff_append_inpad(ctx, &pad);
-        if (ret < 0) {
-            av_freep(&pad.name);
+        ret = ff_append_inpad_free_name(ctx, &pad);
+        if (ret < 0)
             return ret;
-        }
     }
 
     pad = (AVFilterPad) {



More information about the ffmpeg-cvslog mailing list