aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/player_thread.c')
-rw-r--r--src/player_thread.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index a827e7505..3d2ebcb42 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -324,10 +324,9 @@ static bool player_seek_decoder(struct player *player)
/* clear music chunks which might still reside in the
pipe */
music_pipe_clear(player->pipe, player_buffer);
- dc.pipe = player->pipe;
/* re-start the decoder */
- dc_start_async(pc.next_song);
+ dc_start_async(pc.next_song, player->pipe);
ret = player_wait_for_decoder(player);
if (!ret) {
/* decoder failure */
@@ -665,8 +664,7 @@ static void do_play(void)
player.pipe = music_pipe_new();
dc.buffer = player_buffer;
- dc.pipe = player.pipe;
- dc_start(&pc.notify, pc.next_song);
+ dc_start(&pc.notify, pc.next_song, player.pipe);
if (!player_wait_for_decoder(&player)) {
player_dc_stop(&player);
player_command_finished();
@@ -735,9 +733,10 @@ static void do_play(void)
assert(pc.next_song != NULL);
assert(!player_dc_at_next_song(&player));
+ dc.pipe = NULL;
+
player.queued = false;
- dc.pipe = music_pipe_new();
- dc_start_async(pc.next_song);
+ dc_start_async(pc.next_song, music_pipe_new());
}
if (player_dc_at_next_song(&player) &&