From 3af7c0760164299e425a834b952846151109d137 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 7 Feb 2019 00:01:24 +0000 Subject: [PATCH] Bodge at the interface between DCPTime and samples; fixes #1461. --- src/lib/player.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/player.cc b/src/lib/player.cc index 7156e3122..caf165e11 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -619,11 +619,10 @@ Player::pass () DCPTimePeriod period (_silent.period_at_position()); if (_last_audio_time) { /* Sometimes the thing that happened last finishes fractionally before - this silence. Bodge the start time of the silence to fix it. I'm - not sure if this is the right solution --- maybe the last thing should - be padded `forward' rather than this thing padding `back'. + or after this silence. Bodge the start time of the silence to fix it. */ - period.from = min(period.from, *_last_audio_time); + DCPOMATIC_ASSERT (labs(period.from.get() - _last_audio_time->get()) < 2); + period.from = *_last_audio_time; } if (period.duration() > one_video_frame()) { period.to = period.from + one_video_frame(); -- 2.30.2