summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-10-27 20:37:09 +0100
committerCarl Hetherington <cth@carlh.net>2025-10-27 20:37:09 +0100
commit4f65e645d2388c538258ef51c65182c6d0a674d8 (patch)
treee578035c14a1c0537bd988e475da965e16800122 /test
parent2b6575bc67f349c396e283097ab0001382427fe0 (diff)
Fix incorrect reading of markers from multi-reel DCPs (#3105).
Diffstat (limited to 'test')
-rw-r--r--test/copy_dcp_details_to_film_test.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/copy_dcp_details_to_film_test.cc b/test/copy_dcp_details_to_film_test.cc
index 6dd913aa0..a46a03d0c 100644
--- a/test/copy_dcp_details_to_film_test.cc
+++ b/test/copy_dcp_details_to_film_test.cc
@@ -29,6 +29,8 @@
using std::make_shared;
+using std::shared_ptr;
+using std::vector;
BOOST_AUTO_TEST_CASE(copy_audio_language_to_film)
@@ -50,3 +52,26 @@ BOOST_AUTO_TEST_CASE(copy_audio_language_to_film)
BOOST_CHECK_EQUAL(film2->audio_language()->as_string(), "de-DE");
}
+
+BOOST_AUTO_TEST_CASE(test_copy_dcp_markers_to_film)
+{
+ auto video = vector<shared_ptr<Content>>{
+ content_factory("test/data/flat_red.png")[0],
+ content_factory("test/data/flat_red.png")[0],
+ content_factory("test/data/flat_red.png")[0]
+ };
+
+ auto film = new_test_film("test_copy_dcp_markers_to_film", video);
+ film->set_reel_type(ReelType::BY_VIDEO_CONTENT);
+ film->set_marker(dcp::Marker::FFEC, dcpomatic::DCPTime::from_seconds(22));
+ make_and_verify_dcp(film);
+
+ auto dcp = make_shared<DCPContent>(film->dir(film->dcp_name()));
+
+ auto film2 = new_test_film("test_copy_dcp_markers_to_film2", { dcp });
+ copy_dcp_markers_to_film(dcp, film2);
+
+ BOOST_CHECK(film2->marker(dcp::Marker::FFEC) == dcpomatic::DCPTime::from_seconds(22));
+}
+
+