aboutsummaryrefslogtreecommitdiffstats
path: root/src/decode.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-23 01:12:30 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-23 01:12:30 +0000
commit0783a2bde14af02c99c7c9fc137b3944bbee14c0 (patch)
tree9f8a58754aee9505d9dc644ce044515d23b27ea3 /src/decode.c
parent4b4438853c3ae05392964eadd8962cb50eae7987 (diff)
downloadmpd-0783a2bde14af02c99c7c9fc137b3944bbee14c0.tar.gz
mpd-0783a2bde14af02c99c7c9fc137b3944bbee14c0.tar.xz
mpd-0783a2bde14af02c99c7c9fc137b3944bbee14c0.zip
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
Diffstat (limited to 'src/decode.c')
-rw-r--r--src/decode.c5
1 files changed, 3 insertions, 2 deletions
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) {