summaryrefslogtreecommitdiff
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2007-09-05 00:25:29 +0000
committerDavid Conrad <lessen42@gmail.com>2007-09-05 00:25:29 +0000
commitc35de1a131b7d6bd2701b749ebbf91b4bd55d87d (patch)
tree0c9a502e4f88427ef74e5119ad290df9b50f9392 /libavformat/matroskaenc.c
parent0b38843a6cb46567e439d4db6830f8ae338b7935 (diff)
Check that the seekheads were created
Originally committed as revision 10369 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index d7726bcd29..484a004a9a 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -632,6 +632,8 @@ static int mkv_write_header(AVFormatContext *s)
// 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;