avfilter/af_amix: make use of av_asprintf()
authorPaul B Mahol <onemda@gmail.com>
Fri, 24 Nov 2017 16:09:48 +0000 (17:09 +0100)
committerPaul B Mahol <onemda@gmail.com>
Fri, 24 Nov 2017 16:09:48 +0000 (17:09 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/af_amix.c

index 09848e5..ec76437 100644 (file)
@@ -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);