diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-01-14 00:24:28 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-01-14 00:24:46 +0000 |
| commit | 77b3fe5cb14784c9365792b0c15f8a68d11546dd (patch) | |
| tree | 796b1adec6b6e97202110f004fdad5b4c7dcec9a /src/lib/dcp_decoder.cc | |
| parent | 97ce603137dace8e85fe72975644c220d7fa9ae8 (diff) | |
Emit subtitles with correct times when they occur at different times within a frame period.
Diffstat (limited to 'src/lib/dcp_decoder.cc')
| -rw-r--r-- | src/lib/dcp_decoder.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 1a4896fe7..23b834767 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -188,12 +188,11 @@ DCPDecoder::pass_subtitles (ContentTime next) true ); - if (!subs.empty ()) { - /* XXX: assuming that all `subs' are at the same time; maybe this is ok */ + BOOST_FOREACH (dcp::SubtitleString i, subs) { subtitle->emit_text ( ContentTimePeriod ( - ContentTime::from_frames (_offset - entry_point, vfr) + ContentTime::from_seconds (subs.front().in().as_seconds ()), - ContentTime::from_frames (_offset - entry_point, vfr) + ContentTime::from_seconds (subs.front().out().as_seconds ()) + ContentTime::from_frames (_offset - entry_point, vfr) + ContentTime::from_seconds (i.in().as_seconds ()), + ContentTime::from_frames (_offset - entry_point, vfr) + ContentTime::from_seconds (i.out().as_seconds ()) ), subs ); |
