summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-01 11:25:20 +0100
committerCarl Hetherington <cth@carlh.net>2019-11-11 14:12:33 +0100
commitb1f03ef090dd57d8d33b814184583865a92c1d48 (patch)
tree1b54f018761ca1bbb5f6d0c75f7bcd7a1773ad1e /src/lib
parente6a4cb97059f9b4683b00da893dc07bef59ad1e4 (diff)
Increase fudge factor at the boundary between audio signal and silence.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/player.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index cc8556f3d..0cef941f8 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -635,12 +635,15 @@ Player::pass ()
if (_last_audio_time) {
/* Sometimes the thing that happened last finishes fractionally before
or after this silence. Bodge the start time of the silence to fix it.
+ I think is nothing too bad to worry about since we will just add or
+ remove a little silence at the end of some content.
*/
int64_t const error = labs(period.from.get() - _last_audio_time->get());
- if (error >= 2) {
+ int64_t const too_much_error = 4;
+ if (error >= too_much_error) {
_film->log()->log(String::compose("Silence starting before or after last audio by %1", error), LogEntry::TYPE_ERROR);
}
- DCPOMATIC_ASSERT (error < 2);
+ DCPOMATIC_ASSERT (error < too_much_error);
period.from = *_last_audio_time;
}
if (period.duration() > one_video_frame()) {