diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-02-07 00:01:24 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-02-07 00:01:24 +0000 |
| commit | 3af7c0760164299e425a834b952846151109d137 (patch) | |
| tree | 0ef1a67dbe4f163a08ab1903d293b9b95058f2c5 | |
| parent | 3dff622252d0cb84b506dd220773541c7da40be2 (diff) | |
Bodge at the interface between DCPTime and samples; fixes #1461.
| -rw-r--r-- | src/lib/player.cc | 7 |
1 files 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(); |
