diff options
author | Max Kellermann <max@duempel.org> | 2008-04-12 04:12:47 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-04-12 04:12:47 +0000 |
commit | 50dc380f2385988047821fe15c5616f44019250f (patch) | |
tree | 347d7d3123252984493691f03ccec41419b48eb8 /src/decode.c | |
parent | e626028b41a957d969b93f2d3cb39813eebaac2b (diff) | |
download | mpd-50dc380f2385988047821fe15c5616f44019250f.tar.gz mpd-50dc380f2385988047821fe15c5616f44019250f.tar.xz mpd-50dc380f2385988047821fe15c5616f44019250f.zip |
added outputBufferEmpty()
Another "don't use OutputBuffer internals" patch. This ignores the
copied "end" value, but I do not think that has ever been a real
issue.
git-svn-id: https://svn.musicpd.org/mpd/trunk@7263 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/decode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decode.c b/src/decode.c index fd65dc5ae..688d78322 100644 --- a/src/decode.c +++ b/src/decode.c @@ -493,7 +493,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * if (pause) player_sleep(); - else if (cb->begin != end && cb->begin != next) { + else if (!outputBufferEmpty(cb) && cb->begin != next) { unsigned int fadePosition; if (doCrossFade == 1 && next >= 0 && ((next > cb->begin && @@ -562,7 +562,7 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * } else cb->begin++; player_wakeup_decoder_nb(); - } else if (cb->begin != end && cb->begin == next) { + } else if (!outputBufferEmpty(cb) && cb->begin == next) { /* at the beginning of a new song */ if (doCrossFade == 1 && nextChunk >= 0) { |