avdevice/lavfi: Use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jun 2014 13:04:50 +0000 (15:04 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jun 2014 13:04:50 +0000 (15:04 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/lavfi.c

index 1ea7ea7..d1904dd 100644 (file)
@@ -211,7 +211,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
     }
 
     /* create a sink for each output and connect them to the graph */
-    lavfi->sinks = av_malloc(sizeof(AVFilterContext *) * avctx->nb_streams);
+    lavfi->sinks = av_malloc_array(avctx->nb_streams, sizeof(AVFilterContext *));
     if (!lavfi->sinks)
         FAIL(AVERROR(ENOMEM));