summaryrefslogtreecommitdiff
path: root/src/lib/text_subtitle_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-12-13 22:04:49 +0000
committerCarl Hetherington <cth@carlh.net>2017-12-13 22:04:49 +0000
commit6a68937320fa76ce213c648845abc73983fc1849 (patch)
tree542a0426b4a0790f28cce34aef43e52b41e896cf /src/lib/text_subtitle_decoder.cc
parent7b0af48a5861cb58314db46d29b05289979c2c25 (diff)
Setup SubtitleDecoder::_position correctly (in some cases).
Diffstat (limited to 'src/lib/text_subtitle_decoder.cc')
-rw-r--r--src/lib/text_subtitle_decoder.cc6
1 files changed, 5 insertions, 1 deletions
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<const TextSubtitleContent>
: 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