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/text_decoder.h | |
| 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/text_decoder.h')
| -rw-r--r-- | src/lib/text_decoder.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/text_decoder.h b/src/lib/text_decoder.h index 607d9e194..5f01c5b1f 100644 --- a/src/lib/text_decoder.h +++ b/src/lib/text_decoder.h @@ -42,11 +42,7 @@ class Image; class TextDecoder : public DecoderPart { public: - TextDecoder ( - Decoder* parent, - std::shared_ptr<const TextContent>, - dcpomatic::ContentTime first - ); + TextDecoder (Decoder* parent, std::shared_ptr<const TextContent>); boost::optional<dcpomatic::ContentTime> position (std::shared_ptr<const Film>) const override { return _position; @@ -60,6 +56,8 @@ public: void emit_plain (dcpomatic::ContentTimePeriod period, sub::Subtitle const & subtitle); void emit_stop (dcpomatic::ContentTime to); + void maybe_set_position (dcpomatic::ContentTime position); + void seek () override; std::shared_ptr<const TextContent> content () const { |
