ao_wasapi: Fix mistaken behavior on uninit

The parameter, when true, tells whether uninit should block for flushing
the buffers, not whether it should quit immediately without flushing.
This commit is contained in:
Diogo Franco (Kovensky) 2013-12-08 19:34:56 -03:00
parent c7064ce5e5
commit 04faf9a1cb
1 changed files with 2 additions and 2 deletions

View File

@ -1215,11 +1215,11 @@ static int setup_buffers(struct wasapi_state *state)
return !state->ringbuff;
}
static void uninit(struct ao *ao, bool immed)
static void uninit(struct ao *ao, bool block)
{
mp_msg(MSGT_AO, MSGL_V, "ao-wasapi: uninit!\n");
struct wasapi_state *state = (struct wasapi_state *)ao->priv;
state->immed = immed;
state->immed = !block;
SetEvent(state->hUninit);
/* wait up to 10 seconds */
if (WaitForSingleObject(state->threadLoop, 10000) == WAIT_TIMEOUT)