diff options
Diffstat (limited to 'src/decode.c')
-rw-r--r-- | src/decode.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/decode.c b/src/decode.c index 688d78322..55f272303 100644 --- a/src/decode.c +++ b/src/decode.c @@ -496,12 +496,8 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * else if (!outputBufferEmpty(cb) && cb->begin != next) { unsigned int fadePosition; if (doCrossFade == 1 && next >= 0 && - ((next > cb->begin && - (fadePosition = next - cb->begin) - <= crossFadeChunks) || - (cb->begin > next && - (fadePosition = next - cb->begin + - buffered_chunks) <= crossFadeChunks))) { + (fadePosition = outputBufferRelative(cb, next)) + <= crossFadeChunks) { /* perform cross fade */ if (nextChunk < 0) { /* beginning of the cross fade |