[FFmpeg-cvslog] avdevice/lavfi: Use av_malloc_array()

Michael Niedermayer git at videolan.org
Sat Jun 7 15:11:08 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun  7 15:04:50 2014 +0200| [3a10bf93b5ba7106bb4f791be0fa5e982757b83f] | committer: Michael Niedermayer

avdevice/lavfi: Use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavdevice/lavfi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 1ea7ea7..d1904dd 100644
--- a/libavdevice/lavfi.c
+++ b/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));
 



More information about the ffmpeg-cvslog mailing list