Commit f1686956 authored by Max Kellermann's avatar Max Kellermann

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.
parent 113c1c0a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment