diff options
Diffstat (limited to 'audio/out/ao_wasapi.c')
-rw-r--r-- | audio/out/ao_wasapi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/audio/out/ao_wasapi.c b/audio/out/ao_wasapi.c index 146dd203c6..eecfded9e1 100644 --- a/audio/out/ao_wasapi.c +++ b/audio/out/ao_wasapi.c @@ -248,12 +248,11 @@ static void uninit(struct ao *ao) if (state->hWake) set_thread_state(ao, WASAPI_THREAD_SHUTDOWN); - // wait up to 10 seconds if (state->hAudioThread && - WaitForSingleObject(state->hAudioThread, 10000) == WAIT_TIMEOUT) + WaitForSingleObject(state->hAudioThread, INFINITE) != WAIT_OBJECT_0) { - MP_ERR(ao, "Audio loop thread refuses to abort\n"); - return; + MP_ERR(ao, "Unexpected return value from WaitForSingleObject " + "while waiting for audio thread to terminate\n"); } SAFE_RELEASE(state->hInitDone, CloseHandle(state->hInitDone)); |