diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-04 01:14:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-04 01:14:12 +0100 |
| commit | 41c4d628f7ef3c9f9b434d34ff099f5fe4de1ae4 (patch) | |
| tree | f912e10cfd99245933ffd3eaa0d39a01aec1daad /src/text.cc | |
| parent | 09e16aa3acf7878b54a4995a0be79890f26db09f (diff) | |
Port support for MXF-wrapped subtitles from 0.x
Diffstat (limited to 'src/text.cc')
| -rw-r--r-- | src/text.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/text.cc b/src/text.cc index 888cab29..6fbdbe6e 100644 --- a/src/text.cc +++ b/src/text.cc @@ -39,7 +39,12 @@ Text::Text (boost::shared_ptr<const cxml::Node> node) : v_align (CENTER) { text = node->content (); - v_position = node->number_attribute<float> ("VPosition"); + optional<float> x = node->optional_number_attribute<float> ("VPosition"); + if (!x) { + x = node->number_attribute<float> ("Vposition"); + } + v_position = x.get (); + optional<string> v = node->optional_string_attribute ("VAlign"); if (v) { v_align = string_to_valign (v.get ()); |
