Bump libsub for libdcp dependency removal.
authorCarl Hetherington <cth@carlh.net>
Sat, 3 Dec 2022 09:15:05 +0000 (10:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 3 Dec 2022 09:17:45 +0000 (10:17 +0100)
cscript
src/lib/text_decoder.cc

diff --git a/cscript b/cscript
index 5514c2ae784e920357e5c649583e464d66b7d15e..11f3c9befec82763cb1adae4bf18e1d41af83a64 100644 (file)
--- a/cscript
+++ b/cscript
@@ -454,7 +454,7 @@ def dependencies(target, options):
         deps = []
 
     deps.append(('libdcp', 'v1.8.34'))
         deps = []
 
     deps.append(('libdcp', 'v1.8.34'))
-    deps.append(('libsub', 'v1.6.40'))
+    deps.append(('libsub', 'v1.6.41'))
     deps.append(('leqm-nrt', '93ae9e6'))
     deps.append(('rtaudio', 'f619b76'))
     # We get our OpenSSL libraries from the environment, but we
     deps.append(('leqm-nrt', '93ae9e6'))
     deps.append(('rtaudio', 'f619b76'))
     # We get our OpenSSL libraries from the environment, but we
index 750deb9b30602b952e88876ca27c20f1683d1178..6fd036ae191ad193b5f1813e8eba8c5219e4949f 100644 (file)
@@ -226,12 +226,16 @@ TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & sub_subti
                           content by the other emit_plain_start() above.
                        */
 
                           content by the other emit_plain_start() above.
                        */
 
+                       auto dcp_colour = [](sub::Colour const& c) {
+                               return dcp::Colour(lrintf(c.r * 255), lrintf(c.g * 255), lrintf(c.b * 255));
+                               };
+
                        auto dcp_subtitle = dcp::SubtitleString(
                                optional<string>(),
                                block.italic,
                                block.bold,
                                block.underline,
                        auto dcp_subtitle = dcp::SubtitleString(
                                optional<string>(),
                                block.italic,
                                block.bold,
                                block.underline,
-                               block.colour.dcp(),
+                               dcp_colour(block.colour),
                                block.font_size.points (72 * 11),
                                1.0,
                                dcp::Time (from.seconds(), 1000),
                                block.font_size.points (72 * 11),
                                1.0,
                                dcp::Time (from.seconds(), 1000),
@@ -245,7 +249,7 @@ TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & sub_subti
                                dcp::Direction::LTR,
                                block.text,
                                dcp::Effect::NONE,
                                dcp::Direction::LTR,
                                block.text,
                                dcp::Effect::NONE,
-                               block.effect_colour.get_value_or(sub::Colour(0, 0, 0)).dcp(),
+                               dcp_colour(block.effect_colour.get_value_or(sub::Colour(0, 0, 0))),
                                /* Hack: we should use subtitle.fade_up and subtitle.fade_down here
                                   but the times of these often don't have a frame rate associated
                                   with them so the sub::Time won't convert them to milliseconds without
                                /* Hack: we should use subtitle.fade_up and subtitle.fade_down here
                                   but the times of these often don't have a frame rate associated
                                   with them so the sub::Time won't convert them to milliseconds without