{input,mixer}/alsa: cancel the DeferredMonitor in the destructor

Yet another potential crash bug fix.
This commit is contained in:
Max Kellermann 2017-02-10 15:05:49 +01:00
parent 7372c931b3
commit 20ae84bff9
2 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,7 @@ public:
~AlsaInputStream() {
BlockingCall(MultiSocketMonitor::GetEventLoop(), [this](){
MultiSocketMonitor::Reset();
DeferredMonitor::Cancel();
});
snd_pcm_close(capture_handle);

View File

@ -57,6 +57,7 @@ public:
~AlsaMixerMonitor() {
BlockingCall(MultiSocketMonitor::GetEventLoop(), [this](){
MultiSocketMonitor::Reset();
DeferredMonitor::Cancel();
});
}