From ac7ce73526ae3d077a89368dc943187734a4986f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 21 Apr 2016 14:02:34 +0200 Subject: [PATCH] player/Thread: cancel audio when decoder startup on seek fails Fixes assertion failure in MultipleOutputs::Open() after seeking to a failing song during playback. --- src/player/Thread.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx index 613e1ef94..a08caca2e 100644 --- a/src/player/Thread.cxx +++ b/src/player/Thread.cxx @@ -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; }