summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-05-11 13:50:57 +0200
committerCarl Hetherington <cth@carlh.net>2023-05-12 22:11:06 +0200
commit83d63bb331190db4372de4d0aaf8413c51f1eee4 (patch)
tree1fed31a4b045fb1d586b2db445474d2d923b7845 /test
parentff02c27b53222592e394d7cde1c904b27a211488 (diff)
Handle fonts for ccaps coming from DCP content (#2525).
Not dealing with them calls all sort of chaos as described in the bug report.
Diffstat (limited to 'test')
-rw-r--r--test/torture_test.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/torture_test.cc b/test/torture_test.cc
index bc03c93d8..0c781fdb1 100644
--- a/test/torture_test.cc
+++ b/test/torture_test.cc
@@ -299,3 +299,29 @@ BOOST_AUTO_TEST_CASE (torture_test1)
}
}
+
+
+BOOST_AUTO_TEST_CASE(multi_reel_interop_ccap_test)
+{
+ auto pic1 = content_factory("test/data/flat_red.png").front();
+ auto ccap1 = content_factory("test/data/15s.srt").front();
+ auto pic2 = content_factory("test/data/flat_red.png").front();
+ auto ccap2 = content_factory("test/data/15s.srt").front();
+ auto film1 = new_test_film2("multi_reel_interop_ccap_test1", { pic1, ccap1, pic2, ccap2 });
+ film1->set_interop(true);
+ film1->set_reel_type(ReelType::BY_VIDEO_CONTENT);
+ ccap1->text[0]->set_type(TextType::CLOSED_CAPTION);
+ pic1->video->set_length(15 * 24);
+ ccap2->text[0]->set_type(TextType::CLOSED_CAPTION);
+ pic2->video->set_length(15 * 24);
+ make_and_verify_dcp(film1, { dcp::VerificationNote::Code::INVALID_STANDARD, dcp::VerificationNote::Code::INVALID_SUBTITLE_SPACING });
+
+ auto reload = make_shared<DCPContent>(film1->dir(film1->dcp_name()));
+ auto film2 = new_test_film2("multi_reel_interop_ccap_test2", { reload });
+ for (auto i: reload->text) {
+ i->set_use(true);
+ }
+ film2->set_interop(true);
+ make_and_verify_dcp(film2, { dcp::VerificationNote::Code::INVALID_STANDARD, dcp::VerificationNote::Code::INVALID_SUBTITLE_SPACING });
+}
+