From: Carl Hetherington Date: Thu, 7 Feb 2019 00:35:23 +0000 (+0000) Subject: Add a test for the bug fixed by the previous commit. X-Git-Tag: v2.13.114^0 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=c22f6ffdbf11ac7405e6f59c00fac3f5adc6c51a;hp=3af7c0760164299e425a834b952846151109d137 Add a test for the bug fixed by the previous commit. --- diff --git a/test/silence_padding_test.cc b/test/silence_padding_test.cc index b5725bb44..070cb235d 100644 --- a/test/silence_padding_test.cc +++ b/test/silence_padding_test.cc @@ -128,3 +128,21 @@ BOOST_AUTO_TEST_CASE (silence_padding_test) test_silence_padding (i); } } + +/** Test a situation that used to crash because of a sub-sample rounding confusion + * caused by a trim. + */ + +BOOST_AUTO_TEST_CASE (silence_padding_test2) +{ + shared_ptr film = new_test_film2 ("silence_padding_test2"); + shared_ptr content (new FFmpegContent(private_data / "cars.mov")); + film->examine_and_add_content (content); + BOOST_REQUIRE (!wait_for_jobs()); + + film->set_video_frame_rate (24); + content->set_trim_start (ContentTime(4003)); + + film->make_dcp (); + BOOST_REQUIRE (!wait_for_jobs()); +}