From 96dc0a318afc5eba581696640a50f652cc3fc964 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 4 Feb 2013 10:15:34 +0100 Subject: 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) --- NEWS | 2 ++ src/player_thread.c | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f57736b0..c92c0fa2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.17.4 (2013/??/??) * decoder: - ffmpeg: support float planar audio (ffmpeg 1.1) +* player: + - implement missing "idle" events on output errors ver 0.17.3 (2013/01/06) diff --git a/src/player_thread.c b/src/player_thread.c index 707fb27a..593788ca 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -326,6 +326,8 @@ player_open_output(struct player *player) pc->state = PLAYER_STATE_PAUSE; player_unlock(pc); + idle_add(IDLE_PLAYER); + return false; } } @@ -800,6 +802,8 @@ play_next_chunk(struct player *player) player_unlock(pc); + idle_add(IDLE_PLAYER); + return false; } @@ -845,13 +849,17 @@ player_song_border(struct player *player) struct player_control *const pc = player->pc; player_lock(pc); - if (pc->border_pause) { + const bool border_pause = pc->border_pause; + if (border_pause) { player->paused = true; pc->state = PLAYER_STATE_PAUSE; } player_unlock(pc); + if (border_pause) + idle_add(IDLE_PLAYER); + return true; } -- cgit v1.2.3 From d5b756413a1ea432e8e580b27fef004223895f07 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Mon, 18 Feb 2013 22:57:39 +0100 Subject: command: allow to omit END in ranges (START:END) If END is omitted, mpd should use the highest possible value instead of raising an error. This partially reverts 52e9cab1c1743f64a7 --- NEWS | 2 ++ src/protocol/argparser.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c92c0fa2..8617ffb0 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.17.4 (2013/??/??) +* protocol: + - allow to omit END in ranges (START:END) * decoder: - ffmpeg: support float planar audio (ffmpeg 1.1) * player: diff --git a/src/protocol/argparser.c b/src/protocol/argparser.c index b21d4c53..d20437cb 100644 --- a/src/protocol/argparser.c +++ b/src/protocol/argparser.c @@ -103,7 +103,7 @@ check_range(struct client *client, unsigned *value_r1, unsigned *value_r2, if (*test == ':') { value = strtol(++test, &test2, 10); - if (test2 == test || *test2 != '\0') { + if (*test2 != '\0') { command_error(client, ACK_ERROR_ARG, "Integer or range expected: %s", s); return false; -- cgit v1.2.3