Skip to content

Commit

Permalink
pulseaudio: don't let FlushCapture get stuck in an infinite loop on s…
Browse files Browse the repository at this point in the history
…hutdown.

Fixes Bugzilla #4645.
  • Loading branch information
icculus committed Dec 3, 2019
1 parent 7b08eb4 commit 3da6a0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/pulseaudio/SDL_pulseaudio.c
Expand Up @@ -429,7 +429,7 @@ PULSEAUDIO_FlushCapture(_THIS)
h->capturelen = 0;
}

while (SDL_TRUE) {
while (SDL_AtomicGet(&this->enabled)) {
if (PULSEAUDIO_pa_context_get_state(h->context) != PA_CONTEXT_READY ||
PULSEAUDIO_pa_stream_get_state(h->stream) != PA_STREAM_READY ||
PULSEAUDIO_pa_mainloop_iterate(h->mainloop, 1, NULL) < 0) {
Expand Down

0 comments on commit 3da6a0b

Please sign in to comment.