diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-01-30 00:34:13 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-01-30 00:34:13 +0000 |
| commit | c463929602252be95ca340b477b7f3b42ff6b0c0 (patch) | |
| tree | efe628dec96c1c2548b4dcd1a77e62c48fb897ad | |
| parent | 03c7887aea20138427c77a6fdd1375c18b5ee9d3 (diff) | |
Fix assertion failure in emit_audio.
| -rw-r--r-- | src/lib/player.cc | 8 |
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(); } |
