Commit 05417049 authored by Max Kellermann's avatar Max Kellermann

input/alsa: clear sockets from within IOThread

Fixes assertion failure in implicit destructor.
parent c7b0c46d
ver 0.20.2 (not yet released)
* input
- alsa: fix crash bug
* decoder
- flac: add options "probesize" and "analyzeduration"
* resampler
......
......@@ -28,6 +28,7 @@
#include "AlsaInputPlugin.hxx"
#include "../InputPlugin.hxx"
#include "../AsyncInputStream.hxx"
#include "event/Call.hxx"
#include "util/Domain.hxx"
#include "util/RuntimeError.hxx"
#include "util/StringCompare.hxx"
......@@ -99,6 +100,14 @@ public:
}
~AlsaInputStream() {
/* ClearSocketList must be called from within the
IOThread; if we don't do it manually here, the
~MultiSocketMonitor() will do it in the current
thread */
BlockingCall(MultiSocketMonitor::GetEventLoop(), [this](){
ClearSocketList();
});
snd_pcm_close(capture_handle);
}
......
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