Commit 96dc0a31 authored by Max Kellermann's avatar Max Kellermann

player_thread: implement missing "idle" events on output errors

When all outputs fail, MPD automatically pauses playback, but did not emit the IDLE_PLAYER event. Thus, clients were not woken up. (Mantis 3665)
parent 1105e61f
ver 0.17.4 (2013/??/??) ver 0.17.4 (2013/??/??)
* decoder: * decoder:
- ffmpeg: support float planar audio (ffmpeg 1.1) - ffmpeg: support float planar audio (ffmpeg 1.1)
* player:
- implement missing "idle" events on output errors
ver 0.17.3 (2013/01/06) ver 0.17.3 (2013/01/06)
......
...@@ -326,6 +326,8 @@ player_open_output(struct player *player) ...@@ -326,6 +326,8 @@ player_open_output(struct player *player)
pc->state = PLAYER_STATE_PAUSE; pc->state = PLAYER_STATE_PAUSE;
player_unlock(pc); player_unlock(pc);
idle_add(IDLE_PLAYER);
return false; return false;
} }
} }
...@@ -800,6 +802,8 @@ play_next_chunk(struct player *player) ...@@ -800,6 +802,8 @@ play_next_chunk(struct player *player)
player_unlock(pc); player_unlock(pc);
idle_add(IDLE_PLAYER);
return false; return false;
} }
...@@ -845,13 +849,17 @@ player_song_border(struct player *player) ...@@ -845,13 +849,17 @@ player_song_border(struct player *player)
struct player_control *const pc = player->pc; struct player_control *const pc = player->pc;
player_lock(pc); player_lock(pc);
if (pc->border_pause) { const bool border_pause = pc->border_pause;
if (border_pause) {
player->paused = true; player->paused = true;
pc->state = PLAYER_STATE_PAUSE; pc->state = PLAYER_STATE_PAUSE;
} }
player_unlock(pc); player_unlock(pc);
if (border_pause)
idle_add(IDLE_PLAYER);
return true; return true;
} }
......
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