[FFmpeg-devel] [PATCH v3 04/25] avfilter/af_afir: Free inpads' names generically

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sun Aug 22 03:47:33 EEST 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 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) {
-- 
2.30.2



More information about the ffmpeg-devel mailing list