diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-09-06 17:15:46 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-09-06 17:15:46 +0200 |
| commit | 24052ed1b36e0ce81fb863830a93f8282285f30d (patch) | |
| tree | a3544b1b8efeac24ef37776b9b09eb479ee27625 /test | |
| parent | 307264b52c70ca0a79831240874fcb2278ebac89 (diff) | |
Fix incorrectly-clipped audio on export (possibly #2865).
Diffstat (limited to 'test')
| m--------- | test/data | 0 | ||||
| -rw-r--r-- | test/ffmpeg_encoder_test.cc | 24 |
2 files changed, 24 insertions, 0 deletions
diff --git a/test/data b/test/data -Subproject 0e08d315725cb18acd04880eb6c7f463f003873 +Subproject 349501404a251e7250094937c418b7802724392 diff --git a/test/ffmpeg_encoder_test.cc b/test/ffmpeg_encoder_test.cc index cb4f3cfea..051832b2f 100644 --- a/test/ffmpeg_encoder_test.cc +++ b/test/ffmpeg_encoder_test.cc @@ -538,3 +538,27 @@ BOOST_AUTO_TEST_CASE(ffmpeg_encoder_missing_frame_at_end) BOOST_CHECK_EQUAL(nb_read_frames, 26); } + +BOOST_AUTO_TEST_CASE(test_ffmpeg_encoder_with_clipping_dcp_audio) +{ + string const name = "test_ffmpeg_encoder_with_clipping_dcp_audio"; + auto content = content_factory("test/data/sine_16_48_440_10.wav"); + auto film = new_test_film(name + "_in", content); + content[0]->audio->set_gain(0.5); + + make_and_verify_dcp( + film, + { dcp::VerificationNote::Code::MISSING_CPL_METADATA } + ); + + auto dcp = make_shared<DCPContent>(film->dir(film->dcp_name())); + auto film2 = new_test_film(name + "_out", { dcp }); + + auto job = make_shared<TranscodeJob>(film, TranscodeJob::ChangedBehaviour::IGNORE); + auto const out = boost::filesystem::path("build/test") / (name + "_out.mov"); + FFmpegFilmEncoder encoder(film, job, out, ExportFormat::PRORES_HQ, false, true, false, 23); + encoder.go(); + + check_ffmpeg(out, boost::filesystem::path("test/data") / (name + ".mov"), 0); +} + |
