mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
Make libebml happy so that it will write elements which still have their default value.
This commit is contained in:
parent
019faeced2
commit
2d22769e06
@ -40,15 +40,22 @@ fix_mandatory_tag_elements(EbmlElement *e) {
|
|||||||
if (dynamic_cast<KaxTag *>(e) != NULL) {
|
if (dynamic_cast<KaxTag *>(e) != NULL) {
|
||||||
KaxTag &t = *static_cast<KaxTag *>(e);
|
KaxTag &t = *static_cast<KaxTag *>(e);
|
||||||
GetChild<KaxTagTargets>(t);
|
GetChild<KaxTagTargets>(t);
|
||||||
|
GetChild<KaxTagSimple>(t);
|
||||||
|
|
||||||
} else if (dynamic_cast<KaxTagSimple *>(e) != NULL) {
|
} else if (dynamic_cast<KaxTagSimple *>(e) != NULL) {
|
||||||
KaxTagSimple &s = *static_cast<KaxTagSimple *>(e);
|
KaxTagSimple &s = *static_cast<KaxTagSimple *>(e);
|
||||||
GetChild<KaxTagLangue>(s);
|
KaxTagName &n = GetChild<KaxTagName>(s);
|
||||||
GetChild<KaxTagDefault>(s);
|
*static_cast<EbmlUnicodeString *>(&n) = UTFstring(n);
|
||||||
|
KaxTagLangue &l = GetChild<KaxTagLangue>(s);
|
||||||
|
*static_cast<EbmlString *>(&l) = string(l);
|
||||||
|
KaxTagDefault &d = GetChild<KaxTagDefault>(s);
|
||||||
|
*static_cast<EbmlUInteger *>(&d) = uint64(d);
|
||||||
|
|
||||||
} else if (dynamic_cast<KaxTagTargets *>(e) != NULL) {
|
} else if (dynamic_cast<KaxTagTargets *>(e) != NULL) {
|
||||||
KaxTagTargets &t = *static_cast<KaxTagTargets *>(e);
|
KaxTagTargets &t = *static_cast<KaxTagTargets *>(e);
|
||||||
GetChild<KaxTagTargetTypeValue>(t);
|
GetChild<KaxTagTargetTypeValue>(t);
|
||||||
|
KaxTagTargetTypeValue &v = GetChild<KaxTagTargetTypeValue>(t);
|
||||||
|
*static_cast<EbmlUInteger *>(&v) = uint64(v);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user