summaryrefslogtreecommitdiff
path: root/src/lib/dcp_subtitle_decoder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dcp_subtitle_decoder.cc')
-rw-r--r--src/lib/dcp_subtitle_decoder.cc8
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