summaryrefslogtreecommitdiff
path: root/test/player_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-01 11:25:20 +0100
committerCarl Hetherington <cth@carlh.net>2019-11-01 11:25:20 +0100
commit1b81a1ee7c4eba533fd49939f8e76744f94038b6 (patch)
treecdf96204744084f51f2131effcdd00c0eb6a01fc /test/player_test.cc
parentc0d9ec5d4c7a75448ec36501c2764073b1f12116 (diff)
Increase fudge factor at the boundary between audio signal and silence.
Diffstat (limited to 'test/player_test.cc')
-rw-r--r--test/player_test.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/player_test.cc b/test/player_test.cc
index a7e944cd4..30b1a56dd 100644
--- a/test/player_test.cc
+++ b/test/player_test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2019 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -344,3 +344,17 @@ BOOST_AUTO_TEST_CASE (player_trim_crash)
butler->rethrow ();
}
+
+/** Test a crash when the gap between the last audio and the start of a silent period is more than 1 sample */
+BOOST_AUTO_TEST_CASE (player_silence_crash)
+{
+ shared_ptr<Film> film = new_test_film2 ("player_silence_crash");
+ shared_ptr<Content> sine = content_factory("test/data/impulse_train.wav").front();
+ film->examine_and_add_content (sine);
+ BOOST_REQUIRE (!wait_for_jobs());
+
+ sine->set_video_frame_rate (23.976);
+ film->write_metadata ();
+ film->make_dcp ();
+ BOOST_REQUIRE (!wait_for_jobs());
+}