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.
This commit is contained in:
parent
f421c8a191
commit
507606bb78
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user