summaryrefslogtreecommitdiff
path: root/test/silence_padding_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-02-07 00:35:23 +0000
committerCarl Hetherington <cth@carlh.net>2019-02-07 00:35:23 +0000
commitc22f6ffdbf11ac7405e6f59c00fac3f5adc6c51a (patch)
tree95c3d2d8620b74fe899964410d2550cb6d1f0495 /test/silence_padding_test.cc
parent3af7c0760164299e425a834b952846151109d137 (diff)
Add a test for the bug fixed by the previous commit.v2.13.114
Diffstat (limited to 'test/silence_padding_test.cc')
-rw-r--r--test/silence_padding_test.cc18
1 files changed, 18 insertions, 0 deletions
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> 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());
+}