diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-08-23 21:02:00 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-08-23 21:02:00 -0700 |
commit | d9eaeafe7c404d3e48961ddfcd8cee7299a3fa76 (patch) | |
tree | 0d79e71af209179a23a10612baa4119bb80a0407 | |
parent | a33910f3469617e79ec37c429138e91b64bd827b (diff) | |
download | mpd-d9eaeafe7c404d3e48961ddfcd8cee7299a3fa76.tar.gz mpd-d9eaeafe7c404d3e48961ddfcd8cee7299a3fa76.tar.xz mpd-d9eaeafe7c404d3e48961ddfcd8cee7299a3fa76.zip |
outputBuffer: never calculate xfade time if xfade is off
We don't assert on xfade_time > 0 inside any of the xfade
calculations since we have no lock around xfade_time.
-rw-r--r-- | src/outputBuffer.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c index 541461746..7e899e574 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -422,9 +422,11 @@ static void play_next_chunk(void) return; } - if (ob.xfade_time <= 0 && nr < ob.bpp_cur) { - prevent_buffer_underrun(); - return; + if (ob.xfade_time <= 0) { + if (nr < ob.bpp_cur) { + prevent_buffer_underrun(); + return; + } } else if (nr < xfade_chunks_needed(vec)) { if (dc.state != DC_STATE_STOP && playlist_playing()) { prevent_buffer_underrun(); |