Set up TextDecoder position based on the time that the next thing will
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index bc7d28d7dc0ccf958b139d45c1c057d1f0c0b3a4..82eccb576d5df8248926315b72f6748406e9daaf 100644 (file)
@@ -93,8 +93,10 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr<const Film> film, shared_ptr<const FFmp
        }
 
        if (c->only_text()) {
-               /* XXX: this time here should be the time of the first subtitle, not 0 */
-               text.push_back (make_shared<TextDecoder>(this, c->only_text(), ContentTime()));
+               text.push_back (make_shared<TextDecoder>(this, c->only_text()));
+               /* XXX: we should be calling maybe_set_position() on this TextDecoder, but we can't easily find
+                * the time of the first subtitle at this point.
+                */
        }
 
        for (auto i: c->ffmpeg_audio_streams()) {