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
This commit is contained in:
Max Kellermann 2008-04-12 04:12:16 +00:00 committed by Eric Wong
parent 199ea5f2c1
commit 753b5cf360

View File

@ -171,8 +171,7 @@ static int decodeSeek(PlayerControl * pc, DecoderControl * dc,
dc->current_song != pc->current_song) { dc->current_song != pc->current_song) {
stopDecode(dc); stopDecode(dc);
*next = -1; *next = -1;
cb->begin = 0; clearOutputBuffer(cb);
cb->end = 0;
dc->error = DECODE_ERROR_NOERROR; dc->error = DECODE_ERROR_NOERROR;
dc->start = 1; dc->start = 1;
waitOnDecode(pc, dc, cb, decodeWaitedOn); waitOnDecode(pc, dc, cb, decodeWaitedOn);
@ -607,9 +606,8 @@ void decode(void)
DecoderControl *dc; DecoderControl *dc;
cb = &(getPlayerData()->buffer); cb = &(getPlayerData()->buffer);
clearOutputBuffer(cb);
cb->begin = 0;
cb->end = 0;
pc = &(getPlayerData()->playerControl); pc = &(getPlayerData()->playerControl);
dc = &(getPlayerData()->decoderControl); dc = &(getPlayerData()->decoderControl);
dc->error = DECODE_ERROR_NOERROR; dc->error = DECODE_ERROR_NOERROR;