diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-11-03 01:12:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-11-04 20:30:08 +0100 |
| commit | d7681f55c3f590e98b6c7eea4bffc5800eadd644 (patch) | |
| tree | f1b11399dde03b7b3cc898287e0354472a3106a5 /test | |
| parent | b3056163b9da4425aab25e3c9630a805a48d30ff (diff) | |
Fix failure to play any audio when one stream isn't producing anything (#3108)
Without this we consider a never-pushed stream active, but with position 0,
so we think we never have any audio ready.
Diffstat (limited to 'test')
| -rw-r--r-- | test/player_test.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/player_test.cc b/test/player_test.cc index 7fc21ac36..d20a91020 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -25,6 +25,7 @@ */ +#include "lib/analyse_audio_job.h" #include "lib/audio_buffers.h" #include "lib/audio_content.h" #include "lib/butler.h" @@ -39,6 +40,7 @@ #include "lib/film.h" #include "lib/image_content.h" #include "lib/image_png.h" +#include "lib/job_manager.h" #include "lib/player.h" #include "lib/ratio.h" #include "lib/string_text_file_content.h" @@ -756,3 +758,16 @@ BOOST_AUTO_TEST_CASE(frames_are_copied_correctly_for_low_frame_rates) } } } + + +BOOST_AUTO_TEST_CASE(test_with_audio_stream_that_never_emits_anything) +{ + auto content = content_factory(TestPaths::private_data() / "hunter.mkv"); + auto film = new_test_film("test_with_audio_stream_that_never_emits_anything", content); + + /* Check that the analysis of this file does not fail */ + auto job = make_shared<AnalyseAudioJob>(film, film->playlist(), true); + JobManager::instance()->add(job); + BOOST_REQUIRE(!wait_for_jobs()); +} + |
