From 1bca324e4f1fa3bf3eb809c83722c6d86607f9a6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 3 Jan 2005 16:12:11 +0000 Subject: [PATCH] Fixes for the renamed chapter elements. Patch by Steve Lhomme with modifications by myself. --- src/common/chapters.cpp | 12 +++++++++++- src/common/xml_element_mapping.cpp | 15 +++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/common/chapters.cpp b/src/common/chapters.cpp index 02716f03b..75f935986 100644 --- a/src/common/chapters.cpp +++ b/src/common/chapters.cpp @@ -530,7 +530,6 @@ fix_mandatory_chapter_elements(EbmlElement *e) { KaxEditionEntry &ee = *static_cast(e); GetChild(ee); GetChild(ee); - GetChild(ee); if (FINDFIRST(&ee, KaxEditionUID) == NULL) *static_cast(&GetChild(ee)) = create_unique_uint32(UNIQUE_EDITION_IDS); @@ -560,6 +559,17 @@ fix_mandatory_chapter_elements(EbmlElement *e) { if (FINDFIRST(&d, KaxChapterLanguage) == NULL) *static_cast(&GetChild(d)) = "und"; + } else if (dynamic_cast(e) != NULL) { + KaxChapterProcess &p = *static_cast(e); + + GetChild(p); + + } else if (dynamic_cast(e) != NULL) { + KaxChapterProcessCommand &c = *static_cast(e); + + GetChild(c); + GetChild(c); + } if (dynamic_cast(e) != NULL) { diff --git a/src/common/xml_element_mapping.cpp b/src/common/xml_element_mapping.cpp index 3d78de8b3..a2ee102ae 100644 --- a/src/common/xml_element_mapping.cpp +++ b/src/common/xml_element_mapping.cpp @@ -55,8 +55,7 @@ xml_element_map_init() { {"EditionEntry", EBMLT_MASTER, 1, 0, 0, no_id, NULL, NULL, NULL}, {"EditionUID", EBMLT_UINT, 2, 0, NO_MAX_VALUE, no_id, NULL, NULL, NULL}, {"EditionFlagHidden", EBMLT_BOOL, 2, 0, 0, no_id, NULL, NULL, NULL}, - {"EditionProcessed", EBMLT_UINT, 2, 0, NO_MAX_VALUE, no_id, NULL, NULL, - NULL}, + {"EditionFlagOrdered", EBMLT_BOOL, 2, 0, 0, no_id, NULL, NULL, NULL}, {"EditionFlagDefault", EBMLT_BOOL, 2, 0, 0, no_id, NULL, NULL, NULL}, {"ChapterAtom", EBMLT_MASTER, 2, 0, 0, no_id, NULL, NULL, NULL}, @@ -65,14 +64,18 @@ xml_element_map_init() { {"ChapterTimeEnd", EBMLT_TIME, 3, 0, 0, no_id, NULL, NULL, NULL}, {"ChapterFlagHidden", EBMLT_BOOL, 3, 0, 0, no_id, NULL, NULL, NULL}, {"ChapterFlagEnabled", EBMLT_BOOL, 3, 0, 0, no_id, NULL, NULL, NULL}, - {"ChapterProcessedPrivate", EBMLT_BINARY, 3, 0, 0, no_id, NULL, NULL, - NULL}, {"ChapterPhysicalEquiv", EBMLT_UINT, 3, 0, NO_MAX_VALUE, no_id, NULL, NULL, NULL}, {"ChapterProcess", EBMLT_MASTER, 3, 0, 0, no_id, NULL, NULL, NULL}, - {"ChapterProcessTime", EBMLT_UINT, 4, 0, 0, no_id, NULL, NULL, NULL}, - {"ChapterProcessCommand", EBMLT_BINARY, 4, 0, 0, no_id, NULL, NULL, NULL}, + {"ChapterProcessCodecID", EBMLT_UINT, 4, 0, NO_MAX_VALUE, no_id, NULL, + NULL, NULL}, + {"ChapterProcessPrivate", EBMLT_BINARY, 4, 0, 0, no_id, NULL, NULL, + NULL}, + + {"ChapterProcessCommand", EBMLT_MASTER, 4, 0, 0, no_id, NULL, NULL, NULL}, + {"ChapterProcessTime", EBMLT_UINT, 5, 0, 0, no_id, NULL, NULL, NULL}, + {"ChapterProcessData", EBMLT_BINARY, 5, 0, 0, no_id, NULL, NULL, NULL}, {"ChapterTrack", EBMLT_MASTER, 3, 0, 0, no_id, NULL, NULL, NULL}, {"ChapterTrackNumber", EBMLT_UINT, 4, 0, NO_MAX_VALUE, no_id, NULL, NULL,