summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-11-15 00:35:20 +0100
committerCarl Hetherington <cth@carlh.net>2022-11-15 00:47:36 +0100
commit6ac0c8037f45306798993e743b70afdc62ff4a6b (patch)
tree4ee412d3d2504ae332d59bd63b45429bb28ef04c /test
parente82c83b35e7638957f3d80b12d4c59c17436473a (diff)
Add failing test for #2364.
Diffstat (limited to 'test')
-rw-r--r--test/audio_analysis_test.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/audio_analysis_test.cc b/test/audio_analysis_test.cc
index 8162d540c..b3c519f29 100644
--- a/test/audio_analysis_test.cc
+++ b/test/audio_analysis_test.cc
@@ -218,3 +218,19 @@ BOOST_AUTO_TEST_CASE (analyse_audio_leqm_test)
/* The CLI tool of leqm_nrt gives this value for betty_stereo_48k.wav */
BOOST_CHECK_CLOSE (analysis.leqm().get_value_or(0), 88.276, 0.001);
}
+
+
+/** Bug #2364; a file with a lot of silent video at the end (about 50s worth)
+ * crashed the audio analysis with an OOM on Windows.
+ */
+BOOST_AUTO_TEST_CASE(analyse_audio_with_long_silent_end)
+{
+ auto content = content_factory(TestPaths::private_data() / "2364.mkv")[0];
+ auto film = new_test_film2("analyse_audio_with_long_silent_end", { content });
+
+ auto playlist = make_shared<Playlist>();
+ playlist->add(film, content);
+ boost::signals2::connection c;
+ JobManager::instance()->analyse_audio(film, playlist, false, c, []() {});
+ BOOST_CHECK(!wait_for_jobs());
+}