mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-11 09:01:40 +00:00
pulseaudio: Stop the threaded mainloop before destroying the context.
Otherwise, we might trigger an assertion in libpulse. Reference Issue #8348.
This commit is contained in:
parent
0b71898cb1
commit
10fab3a39e
1 changed files with 3 additions and 1 deletions
|
|
@ -307,13 +307,15 @@ static void WaitForPulseOperation(pa_operation *o)
|
|||
|
||||
static void DisconnectFromPulseServer(void)
|
||||
{
|
||||
if (pulseaudio_threaded_mainloop != NULL) {
|
||||
PULSEAUDIO_pa_threaded_mainloop_stop(pulseaudio_threaded_mainloop);
|
||||
}
|
||||
if (pulseaudio_context) {
|
||||
PULSEAUDIO_pa_context_disconnect(pulseaudio_context);
|
||||
PULSEAUDIO_pa_context_unref(pulseaudio_context);
|
||||
pulseaudio_context = NULL;
|
||||
}
|
||||
if (pulseaudio_threaded_mainloop != NULL) {
|
||||
PULSEAUDIO_pa_threaded_mainloop_stop(pulseaudio_threaded_mainloop);
|
||||
PULSEAUDIO_pa_threaded_mainloop_free(pulseaudio_threaded_mainloop);
|
||||
pulseaudio_threaded_mainloop = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue