Skip to content
Snippets Groups Projects
Commit 1e6a65d0 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2308] Fix pulseaudio stream closing assertion failure

parent 50fd7648
No related branches found
No related tags found
No related merge requests found
...@@ -405,12 +405,19 @@ PulseLayer::stopStream (void) ...@@ -405,12 +405,19 @@ PulseLayer::stopStream (void)
// pa_threaded_mainloop_unlock (m); // pa_threaded_mainloop_unlock (m);
_debug("Disconnecting PulseAudio context\n");
if (context) { if (context) {
pa_threaded_mainloop_lock (m);
pa_context_disconnect (context); pa_context_disconnect (context);
pa_context_unref (context); pa_context_unref (context);
pa_threaded_mainloop_unlock (m);
context = NULL; context = NULL;
} }
_debug("Freeing Pulseaudio mainloop\n");
if (m) { if (m) {
pa_threaded_mainloop_free (m); pa_threaded_mainloop_free (m);
m = NULL; m = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment