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

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


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

avfilter/af_headphone: 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=ad5d056dc37d3df199aaf5055a05bd9b5a24836a
---

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

diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c
index a2f18417bc..0cb188b61d 100644
--- a/libavfilter/af_headphone.c
+++ b/libavfilter/af_headphone.c
@@ -670,10 +670,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;
-        }
     }
 
     if (s->type == TIME_DOMAIN) {
@@ -729,9 +727,6 @@ static av_cold void uninit(AVFilterContext *ctx)
     av_freep(&s->temp_afft[1]);
     av_freep(&s->data_hrtf[0]);
     av_freep(&s->data_hrtf[1]);
-
-    for (unsigned i = 1; i < ctx->nb_inputs; i++)
-        av_freep(&ctx->input_pads[i].name);
 }
 
 #define OFFSET(x) offsetof(HeadphoneContext, x)



More information about the ffmpeg-cvslog mailing list