From 753b5cf360e9ddd88ff0e0e3b05b0b107ff5b851 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:12:16 +0000 Subject: [PATCH] use clearOutputBuffer() clearOutputBuffer() also resets currentChunk; this might resolve a theoretical bug. git-svn-id: https://svn.musicpd.org/mpd/trunk@7257 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/decode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/decode.c b/src/decode.c index 668d08365..47dc96882 100644 --- a/src/decode.c +++ b/src/decode.c @@ -171,8 +171,7 @@ static int decodeSeek(PlayerControl * pc, DecoderControl * dc, dc->current_song != pc->current_song) { stopDecode(dc); *next = -1; - cb->begin = 0; - cb->end = 0; + clearOutputBuffer(cb); dc->error = DECODE_ERROR_NOERROR; dc->start = 1; waitOnDecode(pc, dc, cb, decodeWaitedOn); @@ -607,9 +606,8 @@ void decode(void) DecoderControl *dc; cb = &(getPlayerData()->buffer); + clearOutputBuffer(cb); - cb->begin = 0; - cb->end = 0; pc = &(getPlayerData()->playerControl); dc = &(getPlayerData()->decoderControl); dc->error = DECODE_ERROR_NOERROR;