summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-06-08 09:58:16 +0200
committerCarl Hetherington <cth@carlh.net>2022-06-12 15:40:33 +0200
commitc8a036eb727ceddc64a0304d781c916eb952c001 (patch)
tree86154aac21fd268af47bead23d0077c36d9e5f72 /src/lib/ffmpeg_decoder.cc
parent922dc3605c29bd742a18b02fbe1faae5739b70df (diff)
Set up TextDecoder position based on the time that the next thing willv2.16.14
be emitted, instead of the time that the last thing was (#2268). This is to avoid problems with the example shown in the test, where just because a subtitle in source A comes before a subtitle in source B, source A is pass()ed next and may then emit a subtitle which should be after the next one in B.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index bc7d28d7d..82eccb576 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -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()) {