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

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


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

avfilter/f_interleave: 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=b8e31568dfee086e068b1148e62d42682edf9041
---

 libavfilter/f_interleave.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/libavfilter/f_interleave.c b/libavfilter/f_interleave.c
index d0c94abbce..b60e89762f 100644
--- a/libavfilter/f_interleave.c
+++ b/libavfilter/f_interleave.c
@@ -173,21 +173,13 @@ static av_cold int init(AVFilterContext *ctx)
         default:
             av_assert0(0);
         }
-        if ((ret = ff_append_inpad(ctx, &inpad)) < 0) {
-            av_freep(&inpad.name);
+        if ((ret = ff_append_inpad_free_name(ctx, &inpad)) < 0)
             return ret;
-        }
     }
 
     return 0;
 }
 
-static av_cold void uninit(AVFilterContext *ctx)
-{
-    for (int i = 0; i < ctx->nb_inputs; i++)
-        av_freep(&ctx->input_pads[i].name);
-}
-
 static int config_output(AVFilterLink *outlink)
 {
     AVFilterContext *ctx = outlink->src;
@@ -242,7 +234,6 @@ const AVFilter ff_vf_interleave = {
     .description = NULL_IF_CONFIG_SMALL("Temporally interleave video inputs."),
     .priv_size   = sizeof(InterleaveContext),
     .init        = init,
-    .uninit      = uninit,
     .activate    = activate,
     FILTER_OUTPUTS(interleave_outputs),
     .priv_class  = &interleave_class,
@@ -269,7 +260,6 @@ const AVFilter ff_af_ainterleave = {
     .description = NULL_IF_CONFIG_SMALL("Temporally interleave audio inputs."),
     .priv_size   = sizeof(InterleaveContext),
     .init        = init,
-    .uninit      = uninit,
     .activate    = activate,
     FILTER_OUTPUTS(ainterleave_outputs),
     .priv_class  = &ainterleave_class,



More information about the ffmpeg-cvslog mailing list