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 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/player.c b/src/player.c
index 84fd163..ba424d1 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)


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to