diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-02-25 10:46:15 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-02-25 10:46:15 +0000 |
| commit | 0412f1a2b29f380cb4ca35787fc7174d6948072c (patch) | |
| tree | a0f74429e57e868614da7e01a43cf9a4e73cf9e4 /src/lib/subrip_content.cc | |
| parent | a983bc3abceadae75c7fa070ae394a69e6d8bd5b (diff) | |
Fix a couple of audio crashes in the film viewer. Fix serialisation of SubRipContent.
Diffstat (limited to 'src/lib/subrip_content.cc')
| -rw-r--r-- | src/lib/subrip_content.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/subrip_content.cc b/src/lib/subrip_content.cc index 73499a5f6..9212add68 100644 --- a/src/lib/subrip_content.cc +++ b/src/lib/subrip_content.cc @@ -25,7 +25,9 @@ using std::stringstream; using std::string; +using std::cout; using boost::shared_ptr; +using boost::lexical_cast; SubRipContent::SubRipContent (shared_ptr<const Film> film, boost::filesystem::path path) : Content (film, path) @@ -37,6 +39,7 @@ SubRipContent::SubRipContent (shared_ptr<const Film> film, boost::filesystem::pa SubRipContent::SubRipContent (shared_ptr<const Film> film, shared_ptr<const cxml::Node> node, int version) : Content (film, node) , SubtitleContent (film, node, version) + , _length (node->number_child<DCPTime> ("Length")) { } @@ -69,11 +72,14 @@ SubRipContent::information () const } void -SubRipContent::as_xml (xmlpp::Node* node) +SubRipContent::as_xml (xmlpp::Node* node) const { + LocaleGuard lg; + node->add_child("Type")->add_child_text ("SubRip"); Content::as_xml (node); SubtitleContent::as_xml (node); + node->add_child("Length")->add_child_text (lexical_cast<string> (_length)); } DCPTime |
