avformat/matroskaenc: use av_mallocz_array()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 14 May 2014 23:56:08 +0000 (01:56 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 14 May 2014 23:56:08 +0000 (01:56 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/matroskaenc.c

index 47d056c..8b19ae3 100644 (file)
@@ -1127,7 +1127,7 @@ static int mkv_write_header(AVFormatContext *s)
             version = 4;
     }
 
-    mkv->tracks = av_mallocz(s->nb_streams * sizeof(*mkv->tracks));
+    mkv->tracks = av_mallocz_array(s->nb_streams, sizeof(*mkv->tracks));
     if (!mkv->tracks)
         return AVERROR(ENOMEM);