diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-12-30 02:38:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-30 12:26:18 +0100 |
| commit | 92867095c67a81c77b19fb68862ab396f27624cf (patch) | |
| tree | f5deab848896d82a8feec4528a6db4e3350fb697 | |
| parent | 2adc73c0a760a1fef6a58ae359ed4abe9208d31d (diff) | |
Fix mismatched audio reel length (#3123).3123-reel-length
| -rwxr-xr-x | run/tests | 2 | ||||
| -rw-r--r-- | src/lib/player.cc | 4 | ||||
| -rw-r--r-- | test/player_test.cc | 11 |
3 files changed, 16 insertions, 1 deletions
@@ -3,7 +3,7 @@ # e.g. --run_tests=foo set -e -PRIVATE_GIT="8bf1138b91512fea16179889d33cd5ec801676ca" +PRIVATE_GIT="3193af1f18fd6f0fd8c8a77055e44bfdf93437e8" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" source $DIR/environment diff --git a/src/lib/player.cc b/src/lib/player.cc index 6bfc1efdb..ebdf5682a 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -899,6 +899,10 @@ Player::pass() emit_video_until(film->length()); } + if (_next_audio_time) { + fill_audio(DCPTimePeriod(*_next_audio_time, film->length())); + } + if (_shuffler) { _shuffler->flush(); } diff --git a/test/player_test.cc b/test/player_test.cc index 684cede04..ca81c29f6 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -773,3 +773,14 @@ BOOST_AUTO_TEST_CASE(test_with_audio_stream_that_never_emits_anything) BOOST_REQUIRE(!wait_for_jobs()); } + + +BOOST_AUTO_TEST_CASE(test_fill_audio_at_end) +{ + auto content = content_factory(TestPaths::private_data() / "Video Ts-1.m4v"); + auto film = new_test_film("test_fill_audio_at_end", content); + content[0]->set_trim_start(film, ContentTime::from_seconds((60 + 42) * 60)); + + make_and_verify_dcp(film, {});// dcp::VerificationNote::Code::MISSING_CPL_METADATA }); +} + |
