Remove use of _formatted when writing subtitle XML.
authorCarl Hetherington <cth@carlh.net>
Thu, 29 Jun 2017 12:34:06 +0000 (13:34 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 29 Jun 2017 12:34:06 +0000 (13:34 +0100)
This has the potential to add unwanted whitespace and newlines
which are significant in subtitles.  I think we'd have to write
the XML ourselves to get around this.

src/interop_subtitle_asset.cc
src/smpte_subtitle_asset.cc

index 9951122285b17d51b00808b61e0f54e26d247c9a..cfd37cb8c85b92171d51a6e0b96c13c9eab81dee 100644 (file)
@@ -102,7 +102,7 @@ InteropSubtitleAsset::xml_as_string () const
 
        subtitles_as_xml (root, 250, INTEROP);
 
-       return doc.write_to_string_formatted ("UTF-8");
+       return doc.write_to_string ("UTF-8");
 }
 
 void
index 3b30a0c71a5be7edd1dff883c3cbfe48cb5f1976..c2456b9c90d5b492f3e8b2cbf6c3df37fe38971c 100644 (file)
@@ -278,7 +278,7 @@ SMPTESubtitleAsset::xml_as_string () const
 
        subtitles_as_xml (root->add_child ("SubtitleList", "dcst"), _time_code_rate, SMPTE);
 
-       return doc.write_to_string_formatted ("UTF-8");
+       return doc.write_to_string ("UTF-8");
 }
 
 /** Write this content to a MXF file */