aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-08-23 21:02:00 -0700
committerEric Wong <normalperson@yhbt.net>2008-08-23 21:02:00 -0700
commitd9eaeafe7c404d3e48961ddfcd8cee7299a3fa76 (patch)
tree0d79e71af209179a23a10612baa4119bb80a0407
parenta33910f3469617e79ec37c429138e91b64bd827b (diff)
downloadmpd-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.c8
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();