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

conrad subversion
Wed Sep 5 02:25:30 CEST 2007


Author: conrad
Date: Wed Sep  5 02:25:29 2007
New Revision: 10369

Log:
Check that the seekheads were created


Modified:
   trunk/libavformat/matroskaenc.c

Modified: trunk/libavformat/matroskaenc.c
==============================================================================
--- trunk/libavformat/matroskaenc.c	(original)
+++ trunk/libavformat/matroskaenc.c	Wed Sep  5 02:25:29 2007
@@ -632,6 +632,8 @@ static int mkv_write_header(AVFormatCont
     // currently defined level 1 element
     mkv->main_seekhead    = mkv_start_seekhead(pb, mkv->segment_offset, 10);
     mkv->cluster_seekhead = mkv_start_seekhead(pb, mkv->segment_offset, 0);
+    if (mkv->main_seekhead == NULL || mkv->cluster_seekhead == NULL)
+        return AVERROR(ENOMEM);
 
     if (mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_INFO, url_ftell(pb)) < 0)
         return -1;




More information about the ffmpeg-cvslog mailing list