diff options
author | Max Kellermann <max@duempel.org> | 2009-11-03 19:18:17 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-11-03 19:18:17 +0100 |
commit | acb265d082fad45d6c298098a255bcb7daa4e954 (patch) | |
tree | ddac97073b1dd958ba4d57f892e326736878cbe4 /src | |
parent | 77a647fc2695f95dcf47bb42fd3a6cd519d99736 (diff) | |
download | mpd-acb265d082fad45d6c298098a255bcb7daa4e954.tar.gz mpd-acb265d082fad45d6c298098a255bcb7daa4e954.tar.xz mpd-acb265d082fad45d6c298098a255bcb7daa4e954.zip |
player_thread: don't start the decoder asynchronously
The START command returns without blocking; we don't need the
asynchronous decoder start anymore.
Diffstat (limited to '')
-rw-r--r-- | src/decoder_control.c | 10 | ||||
-rw-r--r-- | src/decoder_control.h | 3 | ||||
-rw-r--r-- | src/player_thread.c | 6 |
3 files changed, 2 insertions, 17 deletions
diff --git a/src/decoder_control.c b/src/decoder_control.c index 9844b6918..b3092f773 100644 --- a/src/decoder_control.c +++ b/src/decoder_control.c @@ -94,16 +94,6 @@ dc_start(struct decoder_control *dc, struct song *song) } void -dc_start_async(struct decoder_control *dc, struct song *song) -{ - assert(dc->pipe != NULL); - assert(song != NULL); - - dc->next_song = song; - dc_command_async(dc, DECODE_COMMAND_START); -} - -void dc_stop(struct decoder_control *dc) { decoder_lock(dc); diff --git a/src/decoder_control.h b/src/decoder_control.h index a4a6e266c..f3bd26d53 100644 --- a/src/decoder_control.h +++ b/src/decoder_control.h @@ -212,9 +212,6 @@ void dc_start(struct decoder_control *dc, struct song *song); void -dc_start_async(struct decoder_control *dc, struct song *song); - -void dc_stop(struct decoder_control *dc); bool diff --git a/src/player_thread.c b/src/player_thread.c index 32d35f309..e8470c827 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -159,8 +159,6 @@ player_wait_for_decoder(struct player *player) { struct decoder_control *dc = player->dc; - dc_command_wait(dc); - if (decoder_lock_has_failed(dc)) { assert(dc->next_song == NULL || dc->next_song->uri != NULL); @@ -331,7 +329,7 @@ static bool player_seek_decoder(struct player *player) dc->pipe = player->pipe; /* re-start the decoder */ - dc_start_async(dc, pc.next_song); + dc_start(dc, pc.next_song); ret = player_wait_for_decoder(player); if (!ret) { /* decoder failure */ @@ -793,7 +791,7 @@ static void do_play(struct decoder_control *dc) player.queued = false; dc->pipe = music_pipe_new(); - dc_start_async(dc, pc.next_song); + dc_start(dc, pc.next_song); } if (dc->pipe != NULL && dc->pipe != player.pipe && |