From ca2d68979e14bb4fd1422e18eead956e2564a7f6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 11 Jul 2017 14:56:08 +0100 Subject: [PATCH] Add failing test for reels with audio hanging over the end of the last bit of video. --- test/reels_test.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/reels_test.cc b/test/reels_test.cc index 6dd40c13e..6c617d6b2 100644 --- a/test/reels_test.cc +++ b/test/reels_test.cc @@ -297,3 +297,24 @@ BOOST_AUTO_TEST_CASE (reels_test6) film->make_dcp (); BOOST_REQUIRE (!wait_for_jobs ()); } + +/** Check the case where the last bit of audio hangs over the end of the video + * and we are using REELTYPE_BY_VIDEO_CONTENT. + */ +BOOST_AUTO_TEST_CASE (reels_test7) +{ + shared_ptr film = new_test_film ("reels_test7"); + film->set_name ("reels_test7"); + film->set_container (Ratio::from_id ("185")); + film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST")); + shared_ptr A (new FFmpegContent (film, "test/data/flat_red.png")); + film->examine_and_add_content (A); + BOOST_REQUIRE (!wait_for_jobs ()); + shared_ptr B (new FFmpegContent (film, "test/data/awkward_length.wav")); + film->examine_and_add_content (B); + BOOST_REQUIRE (!wait_for_jobs ()); + + film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT); + film->make_dcp (); + BOOST_REQUIRE (!wait_for_jobs ()); +} -- 2.30.2