From 0783a2bde14af02c99c7c9fc137b3944bbee14c0 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Tue, 23 Mar 2004 01:12:30 +0000 Subject: fix a bug, due to not resetting decodeType in playerSeek when the file to seek isn't the same as the current playing file git-svn-id: https://svn.musicpd.org/mpd/trunk@409 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/decode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/decode.c') diff --git a/src/decode.c b/src/decode.c index 5c1c05f25..6e3826951 100644 --- a/src/decode.c +++ b/src/decode.c @@ -128,12 +128,12 @@ int waitOnDecode(PlayerControl * pc, AudioFormat * af, DecoderControl * dc, return -1; } + pc->totalTime = cb->totalTime; pc->elapsedTime = 0; pc->bitRate = 0; pc->sampleRate = af->sampleRate; pc->bits = af->bits; pc->channels = af->channels; - pc->totalTime = cb->totalTime; return 0; } @@ -147,10 +147,11 @@ void decodeSeek(PlayerControl * pc, AudioFormat * af, DecoderControl * dc, strcmp(dc->file,pc->file)!=0) { stopDecode(dc); + cb->begin = 0; cb->end = 0; + cb->wrap = 0; dc->error = 0; dc->start = 1; - dc->error = 0; waitOnDecode(pc,af,dc,cb); } if(*decode_pid>0 && dc->state==DECODE_STATE_DECODE) { -- cgit v1.2.3