mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[client] audio/pa: fix assertion failure when keep alive playback stops
When the 'keep alive' playback times out, playback is stopped from the audio callback, resulting in an assertion failure inside PulseAudio as we try to lock the main loop thread while already inside it.
This commit is contained in:
parent
38340d3497
commit
84b5478b02
@ -313,10 +313,15 @@ static void pulseaudio_stop(void)
|
|||||||
if (!pa.sink)
|
if (!pa.sink)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pa_threaded_mainloop_lock(pa.loop);
|
bool needLock = !pa_threaded_mainloop_in_thread(pa.loop);
|
||||||
|
if (needLock)
|
||||||
|
pa_threaded_mainloop_lock(pa.loop);
|
||||||
|
|
||||||
pa_stream_cork(pa.sink, 1, NULL, NULL);
|
pa_stream_cork(pa.sink, 1, NULL, NULL);
|
||||||
pa.sinkCorked = true;
|
pa.sinkCorked = true;
|
||||||
pa_threaded_mainloop_unlock(pa.loop);
|
|
||||||
|
if (needLock)
|
||||||
|
pa_threaded_mainloop_unlock(pa.loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pulseaudio_volume(int channels, const uint16_t volume[])
|
static void pulseaudio_volume(int channels, const uint16_t volume[])
|
||||||
|
Loading…
Reference in New Issue
Block a user