changeset 2500:57954e76863d libavformat

Check that the seekheads were created
author conrad
date Wed, 05 Sep 2007 00:25:29 +0000
parents 77d6661f1947
children b91eb35b1237
files matroskaenc.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroskaenc.c	Wed Sep 05 00:25:27 2007 +0000
+++ b/matroskaenc.c	Wed Sep 05 00:25:29 2007 +0000
@@ -632,6 +632,8 @@
     // 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;