From 2b873f9129917aeb6cd73c8280b634aefc900994 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 11 Aug 2003 21:16:28 +0000 Subject: [PATCH] The new emergency seek head was not checked for children when it should have been written resulting in libmatroska bailing out. --- src/mkvmerge.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mkvmerge.cpp b/src/mkvmerge.cpp index d99d7802a..e743e760d 100644 --- a/src/mkvmerge.cpp +++ b/src/mkvmerge.cpp @@ -1922,8 +1922,8 @@ void finish_file() { kax_as = NULL; } - kax_seekhead->UpdateSize(); - emerg_seek_head->UpdateSize(); + if (kax_seekhead->ListSize() > 0) + kax_seekhead->UpdateSize(); if (kax_seekhead_void->ReplaceWith(*kax_seekhead, *out, true) == 0) { mxprint(stdout, "Warning: Could not update the meta seek information " "as the space reserved for them was too small. Re-run " @@ -1931,7 +1931,10 @@ void finish_file() { "%lld'.\n", kax_seekhead->ElementSize() + 100); if (write_cues && cue_writing_requested) - kax_seekhead_void->ReplaceWith(*emerg_seek_head, *out, true); + if (emerg_seek_head->ListSize() > 0) { + emerg_seek_head->UpdateSize(); + kax_seekhead_void->ReplaceWith(*emerg_seek_head, *out, true); + } } }