Fix fill of timeline periods where there is no video.
[dcpomatic.git] / src / lib / text_subtitle_decoder.cc
index bdec17a8dba0a7ad386ba9f3b2e676ca881d7885..631e0cc0cfbf1b9a018447b709c221fd71b043d0 100644 (file)
@@ -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;