diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-11-26 11:15:02 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-11-26 11:15:02 +0000 |
| commit | d645196b8d6fec1da6c69b28fa9ac2c445a58bd1 (patch) | |
| tree | d430b0a1d85309c28f46c384cbe8b08e9c3c123b /src/interop_subtitle_asset.cc | |
| parent | ea629ead13e819b4ff5d5b5eba7b57520e8107e3 (diff) | |
Allow <Subtitle> nodes as the root of subtitles, not just <Font>
Diffstat (limited to 'src/interop_subtitle_asset.cc')
| -rw-r--r-- | src/interop_subtitle_asset.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc index 5777c31a..f450d360 100644 --- a/src/interop_subtitle_asset.cc +++ b/src/interop_subtitle_asset.cc @@ -58,7 +58,13 @@ InteropSubtitleAsset::InteropSubtitleAsset (boost::filesystem::path file) font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, 250, "Id"))); } - parse_subtitles (xml, font_nodes); + f = xml->node_children ("Subtitle"); + list<shared_ptr<dcp::SubtitleNode> > subtitle_nodes; + BOOST_FOREACH (cxml::NodePtr& i, f) { + subtitle_nodes.push_back (shared_ptr<SubtitleNode> (new SubtitleNode (i, 250, "Id"))); + } + + parse_subtitles (xml, font_nodes, subtitle_nodes); } InteropSubtitleAsset::InteropSubtitleAsset () |
