summaryrefslogtreecommitdiff
path: root/src/lib/dcp_subtitle_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-07-06 12:25:15 +0200
committerCarl Hetherington <cth@carlh.net>2022-07-20 10:22:55 +0200
commit9726a58f44d52d235b027225ddd68c6acf83c733 (patch)
tree4616ea2ccfc9793cb08a752678e7c537a858815d /src/lib/dcp_subtitle_decoder.cc
parentd70f755dde2812bf2311e2ce09563af1b5334d03 (diff)
Handle vertical alignment of subs correctly wrt the difference between Interop and SMPTE.
Diffstat (limited to 'src/lib/dcp_subtitle_decoder.cc')
-rw-r--r--src/lib/dcp_subtitle_decoder.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/dcp_subtitle_decoder.cc b/src/lib/dcp_subtitle_decoder.cc
index 08c2bf7ec..cbfe6fdbe 100644
--- a/src/lib/dcp_subtitle_decoder.cc
+++ b/src/lib/dcp_subtitle_decoder.cc
@@ -46,6 +46,12 @@ DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr<const Film> film, shared_ptr<
_subtitles = asset->subtitles ();
_next = _subtitles.begin ();
+ if (dynamic_pointer_cast<dcp::InteropSubtitleAsset>(asset)) {
+ _standard = dcp::Standard::INTEROP;
+ } else {
+ _standard = dcp::Standard::SMPTE;
+ }
+
text.push_back (make_shared<TextDecoder>(this, content->only_text()));
update_position();
}
@@ -102,7 +108,7 @@ DCPSubtitleDecoder::pass ()
}
}
- only_text()->emit_plain (p, s);
+ only_text()->emit_plain(p, s, _standard);
update_position();