output/thread: cancel the AudioOutputSource() instead of closing it

This fixes the assertion failure due to calling
AudioOutputSource::Close() twice.
This commit is contained in:
Max Kellermann 2018-11-12 12:24:25 +01:00
parent 5eaf2b8fc3
commit 228bf7eb09

View File

@ -468,11 +468,11 @@ AudioOutputControl::Task() noexcept
if (always_on) {
/* in "always_on" mode, the output is
paused instead of being closed;
however we need to close the
however we need to flush the
AudioOutputSource because its data
have been invalidated by stopping
the actual playback */
source.Close();
source.Cancel();
InternalPause();
} else {
InternalClose(false);