From 228bf7eb093f2d628fad87ae2bc18d278a91dc7d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 12 Nov 2018 12:24:25 +0100 Subject: [PATCH] output/thread: cancel the AudioOutputSource() instead of closing it This fixes the assertion failure due to calling AudioOutputSource::Close() twice. --- src/output/Thread.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output/Thread.cxx b/src/output/Thread.cxx index b0556b34d..0d6f5e308 100644 --- a/src/output/Thread.cxx +++ b/src/output/Thread.cxx @@ -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);