aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:09 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:09 +0200
commita68ef497f518c8d7e53ff30733cc749fea505321 (patch)
treedb58841de26a31e0d633dac42b2a9af7f56e8dfb /src
parente8bd9ddc9fc99d31659db1121622bef0f3303fc1 (diff)
downloadmpd-a68ef497f518c8d7e53ff30733cc749fea505321.tar.gz
mpd-a68ef497f518c8d7e53ff30733cc749fea505321.tar.xz
mpd-a68ef497f518c8d7e53ff30733cc749fea505321.zip
don't call quitDecode() in waitOnDecode()
To make the code more consistent, call quitDecode() only at the end of decodeParent().
Diffstat (limited to 'src')
-rw-r--r--src/player_thread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index 0937fb3ca..fa3bbccf7 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -71,7 +71,6 @@ static int waitOnDecode(int *decodeWaitedOn)
if (dc.error != DECODE_ERROR_NOERROR) {
pc.errored_song = dc.next_song;
pc.error = PLAYER_ERROR_FILE;
- quitDecode();
return -1;
}
@@ -211,8 +210,10 @@ static void decodeParent(void)
ob_set_lazy(0);
- if (waitOnDecode(&decodeWaitedOn) < 0)
+ if (waitOnDecode(&decodeWaitedOn) < 0) {
+ quitDecode();
return;
+ }
pc.elapsedTime = 0;
pc.state = PLAYER_STATE_PLAY;