diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-12-13 22:04:49 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-12-13 22:04:49 +0000 |
| commit | 6a68937320fa76ce213c648845abc73983fc1849 (patch) | |
| tree | 542a0426b4a0790f28cce34aef43e52b41e896cf /src/lib/dcp_subtitle_decoder.cc | |
| parent | 7b0af48a5861cb58314db46d29b05289979c2c25 (diff) | |
Setup SubtitleDecoder::_position correctly (in some cases).
Diffstat (limited to 'src/lib/dcp_subtitle_decoder.cc')
| -rw-r--r-- | src/lib/dcp_subtitle_decoder.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/dcp_subtitle_decoder.cc b/src/lib/dcp_subtitle_decoder.cc index 04b264192..965f9db61 100644 --- a/src/lib/dcp_subtitle_decoder.cc +++ b/src/lib/dcp_subtitle_decoder.cc @@ -30,11 +30,15 @@ using boost::bind; DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr<const DCPSubtitleContent> content, shared_ptr<Log> log) { - subtitle.reset (new SubtitleDecoder (this, content->subtitle, log)); - shared_ptr<dcp::SubtitleAsset> c (load (content->path (0))); _subtitles = c->subtitles (); _next = _subtitles.begin (); + + ContentTime first; + if (_next != _subtitles.end()) { + first = content_time_period(*_next).from; + } + subtitle.reset (new SubtitleDecoder (this, content->subtitle, log, first)); } void |
