mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 08:12:17 +00:00
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:
parent
c7064ce5e5
commit
04faf9a1cb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user