aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-04-08 21:22:06 +0200
committerMax Kellermann <max@duempel.org>2013-04-08 21:31:03 +0200
commit436335e9a3251cbfe42848843e1acea33d22177c (patch)
treefe6e4c96799316c3560a2843e89a37c5d4058d1a
parenta30eb194d5c5188a0e824e72ce959677d5801c0a (diff)
downloadmpd-436335e9a3251cbfe42848843e1acea33d22177c.tar.gz
mpd-436335e9a3251cbfe42848843e1acea33d22177c.tar.xz
mpd-436335e9a3251cbfe42848843e1acea33d22177c.zip
player_control: don't emit IDLE_PLAYER before audio format is known
Eliminates one IDLE_PLAYER call in playlist_control, and add two new ones to player_thread. Fixes Mantis bug 3636.
-rw-r--r--NEWS1
-rw-r--r--src/player_control.c2
-rw-r--r--src/player_thread.c4
3 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index ea746b9c8..dae06def2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
ver 0.17.4 (2013/??/??)
* protocol:
- allow to omit END in ranges (START:END)
+ - don't emit IDLE_PLAYER before audio format is known
* decoder:
- ffmpeg: support float planar audio (ffmpeg 1.1)
- ffmpeg: fix AVFrame allocation
diff --git a/src/player_control.c b/src/player_control.c
index 90f616d77..b18639087 100644
--- a/src/player_control.c
+++ b/src/player_control.c
@@ -127,8 +127,6 @@ pc_play(struct player_control *pc, struct song *song)
assert(pc->next_song == NULL);
player_unlock(pc);
-
- idle_add(IDLE_PLAYER);
}
void
diff --git a/src/player_thread.c b/src/player_thread.c
index 593788caf..ac0b0579e 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -313,6 +313,8 @@ player_open_output(struct player *player)
pc->state = PLAYER_STATE_PLAY;
player_unlock(pc);
+ idle_add(IDLE_PLAYER);
+
return true;
} else {
player->output_open = false;
@@ -375,6 +377,8 @@ player_check_decoder_startup(struct player *player)
pc->audio_format = dc->in_audio_format;
player_unlock(pc);
+ idle_add(IDLE_PLAYER);
+
player->play_audio_format = dc->out_audio_format;
player->decoder_starting = false;