player: chop the tail of the music pipe after CANCEL

When a CANCEL command is received, the player should drop all chunks
of the next song.  Added new funciton music_pipe_chop() which is used
for that.
This commit is contained in:
Max Kellermann
2008-11-13 02:09:33 +01:00
parent 66ce1495f0
commit 709640422c
3 changed files with 19 additions and 0 deletions

View File

@@ -203,6 +203,7 @@ static void player_process_command(struct player *player)
/* the decoder is already decoding the song -
stop it and reset the position */
dc_stop(&pc.notify);
music_pipe_chop(player->next_song_chunk);
player->next_song_chunk = -1;
}