diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-11-01 23:37:36 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-11-02 14:56:37 +0100 |
| commit | be075849acc0858b7e30ea86991f8767c0be83b2 (patch) | |
| tree | f63a40f433e71e4a8a95bf19583a22a88dd17019 | |
| parent | a2f0cf47c69798723c2a45282b2ea65c3f064fd6 (diff) | |
Add failing test.
| -rw-r--r-- | test/vf_test.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/vf_test.cc b/test/vf_test.cc index 810c87a9e..3389e83be 100644 --- a/test/vf_test.cc +++ b/test/vf_test.cc @@ -370,3 +370,31 @@ BOOST_AUTO_TEST_CASE (vf_test7) vf->write_metadata (); make_and_verify_dcp (vf); } + + +/** Test bug #2116 */ +BOOST_AUTO_TEST_CASE (test_vf_with_trimmed_multi_reel_dcp) +{ + /* Make an OV with 3 reels */ + std::vector<std::shared_ptr<Content>> ov_content; + for (int i = 0; i < 3; ++i) { + auto c = content_factory("test/data/flat_red.png").front(); + c->video->set_length(240); + ov_content.push_back(c); + } + auto ov = new_test_film2 ("test_vf_with_trimmed_multi_reel_dcp_ov", ov_content); + ov->set_reel_type(ReelType::BY_VIDEO_CONTENT); + make_and_verify_dcp (ov); + + /* Make a VF with a specific arrangement */ + auto vf_image = content_factory("test/data/flat_red.png").front(); + auto vf_dcp = make_shared<DCPContent>(ov->dir(ov->dcp_name())); + auto vf = new_test_film2 ("test_vf_with_trimmed_multi_reel_dcp_vf", { vf_image, vf_dcp }); + vf->set_reel_type(ReelType::BY_VIDEO_CONTENT); + vf_dcp->set_reference_video(true); + vf_dcp->set_reference_audio(true); + vf_dcp->set_trim_start(ContentTime::from_seconds(10)); + vf_dcp->set_position(vf, DCPTime::from_seconds(10)); + make_and_verify_dcp (vf, { dcp::VerificationNote::Code::EXTERNAL_ASSET }); +} + |
