player: assert that there was no previous "next song chunk"

When assigning the next_song_chunk variable, it must have been empty.
If not, there may be 3 songs overlapping in the music pipe.
This commit is contained in:
Max Kellermann 2008-11-13 01:57:15 +01:00
parent ae9bb92952
commit df09075afc

View File

@ -357,6 +357,7 @@ static void do_play(void)
/* the decoder has finished the current song;
make it decode the next song */
assert(pc.next_song != NULL);
assert(player.next_song_chunk == -1);
player.queued = false;
player.next_song_chunk = music_pipe_tail_index();