diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-01-25 23:37:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-01-25 23:37:54 +0100 |
| commit | 477ea48409c80bbc047c547bb222e87f994f5afa (patch) | |
| tree | b3d2e0f33aceb313559fdee75064e395cf27f700 /test | |
| parent | ae52cd1bb3d469fe4cb5c32b314a6b8a67f15f0e (diff) | |
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.
Diffstat (limited to 'test')
| -rw-r--r-- | test/atmos_test.cc | 33 |
1 files changed, 33 insertions, 0 deletions
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<shared_ptr<Content>> picture; + vector<shared_ptr<Content>> atmos; + vector<shared_ptr<Content>> 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()); + } +} + |
