aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-04-12 04:12:16 +0000
committerEric Wong <normalperson@yhbt.net>2008-04-12 04:12:16 +0000
commit753b5cf360e9ddd88ff0e0e3b05b0b107ff5b851 (patch)
treeab3163f3d8d2c47926196f056ff19d9174662185 /src
parent199ea5f2c1bf76846e28b1283c537a01a85dd0b6 (diff)
downloadmpd-753b5cf360e9ddd88ff0e0e3b05b0b107ff5b851.tar.gz
mpd-753b5cf360e9ddd88ff0e0e3b05b0b107ff5b851.tar.xz
mpd-753b5cf360e9ddd88ff0e0e3b05b0b107ff5b851.zip
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
Diffstat (limited to '')
-rw-r--r--src/decode.c6
1 files 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;