[FFmpeg-cvslog] r23477 - trunk/libavformat/matroskaenc.c

conrad subversion
Sat Jun 5 00:41:07 CEST 2010


Author: conrad
Date: Sat Jun  5 00:41:06 2010
New Revision: 23477

Log:
matroskaenc: Check that tracks was allocated

Modified:
   trunk/libavformat/matroskaenc.c

Modified: trunk/libavformat/matroskaenc.c
==============================================================================
--- trunk/libavformat/matroskaenc.c	Sat Jun  5 00:41:03 2010	(r23476)
+++ trunk/libavformat/matroskaenc.c	Sat Jun  5 00:41:06 2010	(r23477)
@@ -703,6 +703,8 @@ static int mkv_write_header(AVFormatCont
     av_lfg_init(&mkv->lfg, av_get_random_seed());
 
     mkv->tracks = av_mallocz(s->nb_streams * sizeof(*mkv->tracks));
+    if (!mkv->tracks)
+        return AVERROR(ENOMEM);
 
     ebml_header = start_ebml_master(pb, EBML_ID_HEADER, 0);
     put_ebml_uint   (pb, EBML_ID_EBMLVERSION        ,           1);



More information about the ffmpeg-cvslog mailing list