summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-11-20 21:05:41 +0100
committerCarl Hetherington <cth@carlh.net>2023-11-20 21:05:41 +0100
commitc3f083eebb8483a8c2c38375c0258d6174caa730 (patch)
treeddaaaea805be98111a754b03086e030a23d058f4 /test
parentbb8cf4610af37d4f89555f96990ef1b9c7d58acd (diff)
Re-read MXF descriptor after adding a key to a SMPTE subtitle asset (DoM #2660).v1.8.88
Diffstat (limited to 'test')
-rw-r--r--test/smpte_subtitle_test.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/smpte_subtitle_test.cc b/test/smpte_subtitle_test.cc
index eca5cd1f..3bf9dc52 100644
--- a/test/smpte_subtitle_test.cc
+++ b/test/smpte_subtitle_test.cc
@@ -762,3 +762,23 @@ BOOST_AUTO_TEST_CASE(smpte_subtitle_standard_read_correctly)
BOOST_CHECK(test_2014.subtitle_standard() == dcp::SubtitleStandard::SMPTE_2014);
}
+
+BOOST_AUTO_TEST_CASE(smpte_subtitle_intrinsic_duration_read_correctly)
+{
+ dcp::SMPTESubtitleAsset ref("test/data/verify_incorrect_closed_caption_ordering3.xml");
+
+ dcp::Key key;
+ ref.set_key(key);
+
+ auto constexpr duration = 480U;
+
+ ref.set_intrinsic_duration(duration);
+
+ auto const path = boost::filesystem::path("build/test/smpte_subtitle_instrinsic_duration_read_correctly.mxf");
+ ref.write(path);
+
+ auto check = dcp::SMPTESubtitleAsset(path);
+ check.set_key(key);
+ BOOST_CHECK_EQUAL(check.intrinsic_duration(), duration);
+}
+