The new emergency seek head was not checked for children when it should have been written resulting in libmatroska bailing out.

This commit is contained in:
Moritz Bunkus 2003-08-11 21:16:28 +00:00
parent eb46583c01
commit 2b873f9129

View File

@ -1922,8 +1922,8 @@ void finish_file() {
kax_as = NULL; kax_as = NULL;
} }
if (kax_seekhead->ListSize() > 0)
kax_seekhead->UpdateSize(); kax_seekhead->UpdateSize();
emerg_seek_head->UpdateSize();
if (kax_seekhead_void->ReplaceWith(*kax_seekhead, *out, true) == 0) { if (kax_seekhead_void->ReplaceWith(*kax_seekhead, *out, true) == 0) {
mxprint(stdout, "Warning: Could not update the meta seek information " mxprint(stdout, "Warning: Could not update the meta seek information "
"as the space reserved for them was too small. Re-run " "as the space reserved for them was too small. Re-run "
@ -1931,9 +1931,12 @@ void finish_file() {
"%lld'.\n", kax_seekhead->ElementSize() + 100); "%lld'.\n", kax_seekhead->ElementSize() + 100);
if (write_cues && cue_writing_requested) if (write_cues && cue_writing_requested)
if (emerg_seek_head->ListSize() > 0) {
emerg_seek_head->UpdateSize();
kax_seekhead_void->ReplaceWith(*emerg_seek_head, *out, true); kax_seekhead_void->ReplaceWith(*emerg_seek_head, *out, true);
} }
} }
}
// Set the correct size for the segment. // Set the correct size for the segment.
if (kax_segment->ForceSize(out->getFilePointer() - if (kax_segment->ForceSize(out->getFilePointer() -