From 2d22769e0682a126005e97d5e38b605b4b537a60 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 24 Jun 2005 10:36:55 +0000 Subject: [PATCH] Make libebml happy so that it will write elements which still have their default value. --- src/common/tag_common.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/common/tag_common.cpp b/src/common/tag_common.cpp index 22ffd714f..1a0093b21 100644 --- a/src/common/tag_common.cpp +++ b/src/common/tag_common.cpp @@ -40,15 +40,22 @@ fix_mandatory_tag_elements(EbmlElement *e) { if (dynamic_cast(e) != NULL) { KaxTag &t = *static_cast(e); GetChild(t); + GetChild(t); } else if (dynamic_cast(e) != NULL) { KaxTagSimple &s = *static_cast(e); - GetChild(s); - GetChild(s); + KaxTagName &n = GetChild(s); + *static_cast(&n) = UTFstring(n); + KaxTagLangue &l = GetChild(s); + *static_cast(&l) = string(l); + KaxTagDefault &d = GetChild(s); + *static_cast(&d) = uint64(d); } else if (dynamic_cast(e) != NULL) { KaxTagTargets &t = *static_cast(e); GetChild(t); + KaxTagTargetTypeValue &v = GetChild(t); + *static_cast(&v) = uint64(v); }