aboutsummaryrefslogtreecommitdiffhomepage
path: root/audio
diff options
context:
space:
mode:
authorGravatar Kevin Mitchell <kevmitch@gmail.com>2016-02-26 15:16:56 -0800
committerGravatar Kevin Mitchell <kevmitch@gmail.com>2016-02-26 15:43:51 -0800
commit183e2cda309fc81158e18b52e64008a45263212e (patch)
treea846aaf5861cf5f0e09a13a382f5b5470bb84827 /audio
parent67b7038be3855c22fbd5d252e38a46ab8d4487f4 (diff)
ao_wasapi: make wait for audio thread termination infinite
The time-out was a terrible hack for marginally better behaviour when encountering #1773, which appears to have been resolved by a previous commit.
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_wasapi.c7
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));