From f16869569991b17670654aa986cd2f564b519c34 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:17 +0200 Subject: 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. --- src/player.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.3