summaryrefslogtreecommitdiff
path: root/src/lib/text_subtitle_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-05-07 21:47:58 +0100
committerCarl Hetherington <cth@carlh.net>2017-05-08 00:35:35 +0100
commit4c0577afdbb38d4cf15208fb2d74d180f44b4609 (patch)
tree89d2a26156981297ec921b13deca9d6e91d97f55 /src/lib/text_subtitle_decoder.cc
parent52cc6172ce4fcca57a591e88eeaa57b4780ffb55 (diff)
Fix fill of timeline periods where there is no video.
Diffstat (limited to 'src/lib/text_subtitle_decoder.cc')
-rw-r--r--src/lib/text_subtitle_decoder.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/text_subtitle_decoder.cc b/src/lib/text_subtitle_decoder.cc
index bdec17a8d..631e0cc0c 100644
--- a/src/lib/text_subtitle_decoder.cc
+++ b/src/lib/text_subtitle_decoder.cc
@@ -44,6 +44,11 @@ TextSubtitleDecoder::TextSubtitleDecoder (shared_ptr<const TextSubtitleContent>
void
TextSubtitleDecoder::seek (ContentTime time, bool accurate)
{
+ time -= ContentTime::from_seconds (5);
+ if (time < ContentTime()) {
+ time = ContentTime();
+ }
+
Decoder::seek (time, accurate);
_next = 0;