summaryrefslogtreecommitdiff
path: root/src/TimedText_Parser.cpp
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2018-02-03 19:41:49 +0000
committerjhurst <>2018-02-03 19:41:49 +0000
commit40ecb821a29d1049e0a69149b20e552c7fbb0ae0 (patch)
treee3c1706f2807821b4f3d0774134e51d99ac224ae /src/TimedText_Parser.cpp
parent8afeacca42fe3ccc4557a1e5d466d8ff7c76e647 (diff)
Xerces 3 character data was being ignored.
Diffstat (limited to 'src/TimedText_Parser.cpp')
-rw-r--r--src/TimedText_Parser.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/TimedText_Parser.cpp b/src/TimedText_Parser.cpp
index 22d37bb..6b6d006 100644
--- a/src/TimedText_Parser.cpp
+++ b/src/TimedText_Parser.cpp
@@ -151,7 +151,12 @@ get_UUID_from_element(XMLElement* Element, UUID& ID)
{
assert(Element);
const char* p = Element->GetBody().c_str();
- if ( strncmp(p, "urn:uuid:", 9) == 0 ) p += 9;
+
+ if ( strncmp(p, "urn:uuid:", 9) == 0 )
+ {
+ p += 9;
+ }
+
return ID.DecodeHex(p);
}
@@ -159,9 +164,15 @@ get_UUID_from_element(XMLElement* Element, UUID& ID)
bool
get_UUID_from_child_element(const char* name, XMLElement* Parent, UUID& outID)
{
- assert(name); assert(Parent);
+ assert(name);
+ assert(Parent);
XMLElement* Child = Parent->GetChildWithName(name);
- if ( Child == 0 ) return false;
+
+ if ( Child == 0 )
+ {
+ return false;
+ }
+
return get_UUID_from_element(Child, outID);
}
@@ -200,7 +211,7 @@ ASDCP::TimedText::DCSubtitleParser::h__SubtitleParser::OpenRead(const std::strin
Result_t
ASDCP::TimedText::DCSubtitleParser::h__SubtitleParser::OpenRead()
{
- if ( ! m_Root.ParseString(m_XMLDoc.c_str()) )
+ if ( ! m_Root.ParseString(m_XMLDoc) )
return RESULT_FORMAT;
m_TDesc.EncodingName = "UTF-8"; // the XML parser demands UTF-8