Add a test for the bug fixed by the previous commit. v2.13.114
authorCarl Hetherington <cth@carlh.net>
Thu, 7 Feb 2019 00:35:23 +0000 (00:35 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 7 Feb 2019 00:35:23 +0000 (00:35 +0000)
test/silence_padding_test.cc

index b5725bb443fa2d228c4e8550e10b83474bdc9961..070cb235d512cc826c53202540a18a3707d6435d 100644 (file)
@@ -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> film = new_test_film2 ("silence_padding_test2");
+       shared_ptr<FFmpegContent> 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());
+}