player/Thread: cancel audio when decoder startup on seek fails

Fixes assertion failure in MultipleOutputs::Open() after seeking to a
failing song during playback.
This commit is contained in:
Max Kellermann 2016-04-21 14:02:34 +02:00
parent 4c6619e6c5
commit ac7ce73526

View File

@ -213,6 +213,11 @@ private:
bool WaitDecoderStartup() {
while (decoder_starting) {
if (!CheckDecoderStartup()) {
/* if decoder startup fails, make sure
the previous song is not being
played anymore */
pc.outputs.Cancel();
pc.LockCommandFinished();
return false;
}