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

[#3007] Lock the mainloop when flush pulseaudio streams

parent 6be81ab0
No related branches found
No related tags found
No related merge requests found
...@@ -357,12 +357,17 @@ PulseLayer::stopStream (void) ...@@ -357,12 +357,17 @@ PulseLayer::stopStream (void)
{ {
_info("Audio: Stop audio stream"); _info("Audio: Stop audio stream");
pa_threaded_mainloop_lock (m);
if(playback) if(playback)
pa_stream_flush (playback->pulseStream(), NULL, NULL); pa_stream_flush (playback->pulseStream(), NULL, NULL);
if(record) if(record)
pa_stream_flush (record->pulseStream(), NULL, NULL); pa_stream_flush (record->pulseStream(), NULL, NULL);
pa_threaded_mainloop_unlock (m);
disconnectAudioStream(); disconnectAudioStream();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment