[FFmpeg-cvslog] avfilter/af_amix: make use of av_asprintf()

Paul B Mahol git at videolan.org
Fri Nov 24 18:11:57 EET 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Nov 24 17:09:48 2017 +0100| [63826a0b8288c464ef665bb140451f229cfae518] | committer: Paul B Mahol

avfilter/af_amix: make use of av_asprintf()

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavfilter/af_amix.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 09848e5d91..ec764375c0 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -490,12 +490,10 @@ static av_cold int init(AVFilterContext *ctx)
     int i, ret;
 
     for (i = 0; i < s->nb_inputs; i++) {
-        char name[32];
         AVFilterPad pad = { 0 };
 
-        snprintf(name, sizeof(name), "input%d", i);
         pad.type           = AVMEDIA_TYPE_AUDIO;
-        pad.name           = av_strdup(name);
+        pad.name           = av_asprintf("input%d", i);
         if (!pad.name)
             return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list