diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-06-08 09:58:16 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-06-12 15:40:33 +0200 |
| commit | c8a036eb727ceddc64a0304d781c916eb952c001 (patch) | |
| tree | 86154aac21fd268af47bead23d0077c36d9e5f72 /src/lib/dcp_decoder.cc | |
| parent | 922dc3605c29bd742a18b02fbe1faae5739b70df (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/dcp_decoder.cc')
| -rw-r--r-- | src/lib/dcp_decoder.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 636cc8ed2..ad7d3e112 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -80,8 +80,11 @@ DCPDecoder::DCPDecoder (shared_ptr<const Film> film, shared_ptr<const DCPContent audio = make_shared<AudioDecoder>(this, content->audio, fast); } for (auto i: content->text) { - /* XXX: this time here should be the time of the first subtitle, not 0 */ - text.push_back (make_shared<TextDecoder>(this, i, ContentTime())); + text.push_back (make_shared<TextDecoder>(this, i)); + /* We should really call maybe_set_position() on this TextDecoder to set the time + * of the first subtitle, but it probably doesn't matter since we'll always + * have regularly occurring video (and maybe audio) content. + */ } if (content->atmos) { atmos = make_shared<AtmosDecoder>(this, content); |
