summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/player.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 522b8304f..3d5762740 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -595,6 +595,14 @@ Player::pass ()
case SILENT:
{
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'.
+ */
+ period.from = min(period.from, *_last_audio_time);
+ }
if (period.duration() > one_video_frame()) {
period.to = period.from + one_video_frame();
}