summaryrefslogtreecommitdiff
path: root/src/lib/content_text.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-28 14:00:07 +0200
committerCarl Hetherington <cth@carlh.net>2022-04-28 23:55:16 +0200
commite2d4793bfd92b4f210147889b8a69fbda7e3ed7f (patch)
tree724370a5223767ea833db49e7949b9fdedc1cc95 /src/lib/content_text.h
parenta0a6f0dc8107f78b8efba6b1c76aaa8ac8f05ed2 (diff)
Handle multiple bitmap subtitles at the same time correctly (#2239).
Previously if there were two images at the same time we would start them both, then the stop time would be set in the second one but not the first. This meant that the first one would hang around forever.
Diffstat (limited to 'src/lib/content_text.h')
-rw-r--r--src/lib/content_text.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/content_text.h b/src/lib/content_text.h
index fb86bc786..438a76a6e 100644
--- a/src/lib/content_text.h
+++ b/src/lib/content_text.h
@@ -45,9 +45,14 @@ private:
dcpomatic::ContentTime _from;
};
+
class ContentBitmapText : public ContentText
{
public:
+ ContentBitmapText (dcpomatic::ContentTime from)
+ : ContentText(from)
+ {}
+
ContentBitmapText (dcpomatic::ContentTime f, std::shared_ptr<const Image> im, dcpomatic::Rect<double> r)
: ContentText (f)
, subs{ {im, r} }
@@ -57,6 +62,7 @@ public:
std::vector<BitmapText> subs;
};
+
/** A text caption. We store the time period separately (as well as in the dcp::SubtitleStrings)
* as the dcp::SubtitleString timings are sometimes quite heavily quantised and this causes problems
* when we want to compare the quantised periods to the unquantised ones.