Browse Source

avdevice/lavfi: Use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Michael Niedermayer 10 years ago
parent
commit
3a10bf93b5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libavdevice/lavfi.c

+ 1 - 1
libavdevice/lavfi.c

@@ -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));