From 6a68937320fa76ce213c648845abc73983fc1849 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 13 Dec 2017 22:04:49 +0000 Subject: Setup SubtitleDecoder::_position correctly (in some cases). --- src/lib/text_subtitle_decoder.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lib/text_subtitle_decoder.cc') diff --git a/src/lib/text_subtitle_decoder.cc b/src/lib/text_subtitle_decoder.cc index 846c3016e..6188d524f 100644 --- a/src/lib/text_subtitle_decoder.cc +++ b/src/lib/text_subtitle_decoder.cc @@ -38,7 +38,11 @@ TextSubtitleDecoder::TextSubtitleDecoder (shared_ptr : TextSubtitle (content) , _next (0) { - subtitle.reset (new SubtitleDecoder (this, content->subtitle, log)); + ContentTime first; + if (!_subtitles.empty()) { + first = content_time_period(_subtitles[0]).from; + } + subtitle.reset (new SubtitleDecoder (this, content->subtitle, log, first)); } void -- cgit v1.2.3