avformat/mpegtsenc: use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 15 Apr 2014 11:42:46 +0000 (13:42 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 15 Apr 2014 11:51:48 +0000 (13:51 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpegtsenc.c

index d24baa4..8d80e07 100644 (file)
@@ -628,7 +628,7 @@ static int mpegts_write_header(AVFormatContext *s)
     ts->sdt.write_packet = section_write_packet;
     ts->sdt.opaque = s;
 
-    pids = av_malloc(s->nb_streams * sizeof(*pids));
+    pids = av_malloc_array(s->nb_streams, sizeof(*pids));
     if (!pids)
         return AVERROR(ENOMEM);