summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-12-29 20:50:28 +0000
committerCarl Hetherington <cth@carlh.net>2013-12-29 20:50:28 +0000
commit5772ce6a825c7b6239cf1bf4c86f2dd38a4467d2 (patch)
tree9930ed2c474793f23408c6e516cbd6a70b55be87 /src
parent1c5ffd1b20222689439457ab91cd09c3a5a57193 (diff)
Fix crash when processing audio before time 0.
Diffstat (limited to 'src')
-rw-r--r--src/lib/player.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 037af6f4e..600b8dbc2 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -130,7 +130,7 @@ Player::pass ()
}
if (earliest_audio != TIME_MAX) {
- TimedAudioBuffers<DCPTime> tb = _audio_merger.pull (earliest_audio);
+ TimedAudioBuffers<DCPTime> tb = _audio_merger.pull (max (0L, earliest_audio));
Audio (tb.audio, tb.time);
/* This assumes that the audio_frames_to_time conversion is exact
so that there are no accumulated errors caused by rounding.