Fix failing tests.
authorCarl Hetherington <cth@carlh.net>
Mon, 11 Mar 2024 14:25:16 +0000 (15:25 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 20 Mar 2024 06:41:24 +0000 (07:41 +0100)
Broken in the fix for #2780, when we started to check that referenced
audio MXFs have the correct number of channels.

test/required_disk_space_test.cc
test/vf_test.cc

index fad24389bfde51117f7d996caaf358dd37433ef5..b704ccef2d13557fa923bbadbb288a0853d3c626 100644 (file)
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE (required_disk_space_test)
 {
        auto film = new_test_film ("required_disk_space_test");
        film->set_j2k_bandwidth (100000000);
-       film->set_audio_channels (6);
+       film->set_audio_channels(8);
        film->set_reel_type (ReelType::BY_VIDEO_CONTENT);
        auto content_a = content_factory("test/data/flat_blue.png")[0];
        BOOST_REQUIRE (content_a);
@@ -59,7 +59,7 @@ BOOST_AUTO_TEST_CASE (required_disk_space_test)
        check_within_n (
                film->required_disk_space(),
                288LL * (100000000 / 8) / 24 +  // video
-               288LL * 48000 * 6 * 3 / 24 +    // audio
+               288LL * 48000 * 8 * 3 / 24 +    // audio
                65536,                          // extra
                16
                );
@@ -69,17 +69,19 @@ BOOST_AUTO_TEST_CASE (required_disk_space_test)
        check_within_n (
                film->required_disk_space(),
                240LL * (100000000 / 8) / 24 +  // video
-               288LL * 48000 * 6 * 3 / 24 +    // audio
+               288LL * 48000 * 8 * 3 / 24 +    // audio
                65536,                          // extra
                16
                );
 
+       std::string why_not;
+       BOOST_CHECK(content_b->can_reference_audio(film, why_not));
        content_b->set_reference_audio (true);
 
        check_within_n (
                film->required_disk_space(),
                240LL * (100000000 / 8) / 24 +  // video
-               240LL * 48000 * 6 * 3 / 24 +    // audio
+               240LL * 48000 * 8 * 3 / 24 +    // audio
                65536,                          // extra
                16
                );
index ed7f483ae5ae91617ab89eec0107079719fb5549..ca987b22d4ce4cc91d51bf41b5ad7b86ff4beb5a 100644 (file)
@@ -73,6 +73,7 @@ BOOST_AUTO_TEST_CASE (vf_test1)
 
        /* Multi-reel DCP can't be referenced if we are using a single reel for the project */
        film->set_reel_type (ReelType::SINGLE);
+       film->set_audio_channels(16);
        string why_not;
        BOOST_CHECK (!dcp->can_reference_video(film, why_not));
        BOOST_CHECK (!dcp->can_reference_audio(film, why_not));