diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-10 00:07:47 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-10 00:07:47 +0000 |
| commit | 67a414dc3826761c8933640e85560644f5f02310 (patch) | |
| tree | 6fc3ab11423d5fdd15847890be56bb98ed241852 /src/text.cc | |
| parent | 9fc6bcde891567ca04fe2d9835ab48a17c9b69a7 (diff) | |
Fix handling of timing in SMPTE subtitles.
Diffstat (limited to 'src/text.cc')
| -rw-r--r-- | src/text.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/text.cc b/src/text.cc index 782d1711..a846d961 100644 --- a/src/text.cc +++ b/src/text.cc @@ -25,8 +25,10 @@ #include "xml.h" #include "font.h" #include <libcxml/cxml.h> +#include <boost/foreach.hpp> using std::string; +using std::list; using boost::shared_ptr; using boost::optional; using namespace dcp; @@ -35,7 +37,7 @@ using namespace dcp; * in this object's member variables. * @param node Node to read. */ -Text::Text (boost::shared_ptr<const cxml::Node> node) +Text::Text (boost::shared_ptr<const cxml::Node> node, int tcr) : v_align (CENTER) { text = node->content (); @@ -54,5 +56,8 @@ Text::Text (boost::shared_ptr<const cxml::Node> node) v_align = string_to_valign (v.get ()); } - font_nodes = type_children<Font> (node, "Font"); + list<cxml::NodePtr> f = node->node_children ("Font"); + BOOST_FOREACH (cxml::NodePtr& i, f) { + font_nodes.push_back (shared_ptr<Font> (new Font (i, tcr))); + } } |
