summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>2013-12-08 19:34:56 -0300
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2013-12-08 19:36:44 -0300
commit04faf9a1cbeabcf5949cbc85ed73e1ac82d4837f (patch)
treef5da600129104ff65860a76a87ed72339ae29477
parentc7064ce5e5352da27dbef60d71c0806abd5154c4 (diff)
downloadmpv-04faf9a1cbeabcf5949cbc85ed73e1ac82d4837f.tar.bz2
mpv-04faf9a1cbeabcf5949cbc85ed73e1ac82d4837f.tar.xz
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.
-rw-r--r--audio/out/ao_wasapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/ao_wasapi.c b/audio/out/ao_wasapi.c
index e029304433..f1032f1c36 100644
--- a/audio/out/ao_wasapi.c
+++ b/audio/out/ao_wasapi.c
@@ -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)