Commit 507606bb authored by Max Kellermann's avatar Max Kellermann

player_thread: detect finished queued song

When the decoder finishes the "queued" song very quickly (before the "current" song finishes playing), an assertion in do_play() fails because it thinks that it should start decoding the queued song, although that has in fact just finished.
parent f421c8a1
......@@ -817,7 +817,8 @@ static void do_play(struct decoder_control *dc)
*/
#endif
if (decoder_lock_is_idle(dc) && player.queued) {
if (decoder_lock_is_idle(dc) && player.queued &&
dc->pipe == player.pipe) {
/* the decoder has finished the current song;
make it decode the next song */
assert(dc->pipe == NULL || dc->pipe == player.pipe);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment