Commit 5eaf2b8f authored by Max Kellermann's avatar Max Kellermann

output/control: always close the `AudioOutputSource` in `RELEASE`

Fixes a crash bug with `always_on` outputs which occurs because the `AudioOutputSource` still has a pointer to an outdated `MusicChunk`. Fixes #415
parent e097fef7
...@@ -6,7 +6,7 @@ ver 0.21.2 (not yet released) ...@@ -6,7 +6,7 @@ ver 0.21.2 (not yet released)
- ffmpeg: fix broken sound with certain codecs - ffmpeg: fix broken sound with certain codecs
* output * output
- alsa: fix high CPU usage with dmix - alsa: fix high CPU usage with dmix
- httpd: fix two crash bugs - httpd: fix three crash bugs
* mixer * mixer
- alsa: fix more rounding errors - alsa: fix more rounding errors
* fix zlib support * fix zlib support
......
...@@ -467,7 +467,12 @@ AudioOutputControl::Task() noexcept ...@@ -467,7 +467,12 @@ AudioOutputControl::Task() noexcept
if (always_on) { if (always_on) {
/* in "always_on" mode, the output is /* in "always_on" mode, the output is
paused instead of being closed */ paused instead of being closed;
however we need to close the
AudioOutputSource because its data
have been invalidated by stopping
the actual playback */
source.Close();
InternalPause(); InternalPause();
} else { } else {
InternalClose(false); InternalClose(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment