From 477ea48409c80bbc047c547bb222e87f994f5afa Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 25 Jan 2026 23:37:54 +0100 Subject: Fix incorrect calculation of DCP time from Atmos content time for the 2nd and subsequent reels. This would cause only the 1st reel of atmos content to make it into the DCP. --- test/atmos_test.cc | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'test') diff --git a/test/atmos_test.cc b/test/atmos_test.cc index 776cc9310..63da157b5 100644 --- a/test/atmos_test.cc +++ b/test/atmos_test.cc @@ -148,3 +148,36 @@ BOOST_AUTO_TEST_CASE(atmos_replace_test) check(vf, 1); } + +BOOST_AUTO_TEST_CASE(atmos_multi_reel_test) +{ + vector> picture; + vector> atmos; + vector> all; + for (int i = 0; i < 3; ++i) { + picture.push_back(content_factory("test/data/flat_red.png")[0]); + all.push_back(picture.back()); + atmos.push_back(content_factory("test/data/atmos_0.mxf")[0]); + all.push_back(atmos.back()); + } + + auto film = new_test_film("atmos_multi_reel_test", all); + for (auto i = 0; i < 3; ++i) { + picture[i]->set_position(film, dcpomatic::DCPTime::from_seconds(i * 10)); + atmos[i]->set_position(film, dcpomatic::DCPTime::from_seconds(i * 10)); + } + + make_and_verify_dcp(film); + + dcp::DCP dcp(film->dir(film->dcp_name())); + dcp.read(); + auto cpls = dcp.cpls(); + BOOST_REQUIRE_EQUAL(cpls.size(), 1U); + auto reels = cpls[0]->reels(); + BOOST_REQUIRE_EQUAL(reels.size(), 3U); + + for (int i = 0; i < 3; ++i) { + BOOST_CHECK(reels[i]->atmos()); + } +} + -- cgit v1.2.3