Clear the start and end hooks when parsing XML chapters. Prior calls to write_xml_chapters() setup end hooks which were otherwise called by the reading function resulting in crashes.

This commit is contained in:
Moritz Bunkus 2006-11-12 10:31:53 +00:00
parent 04674adcd5
commit f792d7fb66
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-11-12 Moritz Bunkus <moritz@bunkus.org>
* mmg: bug fix: Fixed a crash on loading XML chapters after having
saved XML chapters.
2006-11-11 Moritz Bunkus <moritz@bunkus.org>
* mmg: new feature: Made the "set the delay input field from the

View File

@ -185,8 +185,14 @@ parse_xml_chapters(mm_text_io_c *in,
KaxChapters *chapters;
EbmlMaster *m;
string error;
int i;
try {
for (i = 0; NULL != chapter_elements[i].name; ++i) {
chapter_elements[i].start_hook = NULL;
chapter_elements[i].end_hook = NULL;
}
m = parse_xml_elements("Chapter", chapter_elements, in);
chapters = dynamic_cast<KaxChapters *>(sort_ebml_master(m));
assert(chapters != NULL);