aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:17 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:17 +0200
commitf16869569991b17670654aa986cd2f564b519c34 (patch)
tree9121b1f64ed2e88ab311d6604aca8c7b69aae8de
parent113c1c0af5383d356c9e527f8763566aa5a63ea1 (diff)
downloadmpd-f16869569991b17670654aa986cd2f564b519c34.tar.gz
mpd-f16869569991b17670654aa986cd2f564b519c34.tar.xz
mpd-f16869569991b17670654aa986cd2f564b519c34.zip
don't unlock player queue in playerStop(), playerWait()
There is no caller of these two functions which locks the player queue; replace the playerQueueUnlock() call with an assertion.
Diffstat (limited to '')
-rw-r--r--src/player.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/player.c b/src/player.c
index 84fd163fe..ba424d1d5 100644
--- a/src/player.c
+++ b/src/player.c
@@ -61,19 +61,23 @@ void playerPlay(Song * song)
void playerStop(void)
{
+ assert(pc.queueLockState == PLAYER_QUEUE_UNLOCKED);
+
if (pc.state != PLAYER_STATE_STOP)
player_command(PLAYER_COMMAND_STOP);
pc.queueState = PLAYER_QUEUE_BLANK;
- playerQueueUnlock();
}
void playerWait(void)
{
player_command(PLAYER_COMMAND_CLOSE_AUDIO);
+ assert(pc.queueLockState == PLAYER_QUEUE_UNLOCKED);
+
+ player_command(PLAYER_COMMAND_CLOSE_AUDIO);
+
pc.queueState = PLAYER_QUEUE_BLANK;
- playerQueueUnlock();
}
void playerKill(void)