summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2014-11-14 08:03:12 -0800
committerKevin Mitchell <kevmitch@gmail.com>2014-11-17 03:37:07 -0800
commitd4393be0f92f04922c5530d16b6db808d0b683ed (patch)
tree53c22d4638ddac6b31c434467fefc5af6933ab71 /audio
parent6eb5c6d186c6cd6bd945e408bfc9292e8d17d1da (diff)
downloadmpv-d4393be0f92f04922c5530d16b6db808d0b683ed.tar.bz2
mpv-d4393be0f92f04922c5530d16b6db808d0b683ed.tar.xz
ao/wasapi: make calling of thread_init consistent with thread_uninit
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_wasapi.c2
-rwxr-xr-xaudio/out/ao_wasapi_utils.c4
-rwxr-xr-xaudio/out/ao_wasapi_utils.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/audio/out/ao_wasapi.c b/audio/out/ao_wasapi.c
index c9a079ffc9..68317703d5 100644
--- a/audio/out/ao_wasapi.c
+++ b/audio/out/ao_wasapi.c
@@ -126,7 +126,7 @@ static DWORD __stdcall ThreadLoop(void *lpParameter)
QS_POSTMESSAGE | QS_SENDMESSAGE);
switch (waitstatus) {
case WAIT_OBJECT_0: /*shutdown*/
- wasapi_thread_uninit(state);
+ wasapi_thread_uninit(ao);
goto exit_label;
case (WAIT_OBJECT_0 + 1): /* feed */
thread_feed(ao);
diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c
index 9ffaab43fb..921b0dbc6b 100755
--- a/audio/out/ao_wasapi_utils.c
+++ b/audio/out/ao_wasapi_utils.c
@@ -976,8 +976,10 @@ exit_label:
return -1;
}
-void wasapi_thread_uninit(wasapi_state *state)
+void wasapi_thread_uninit(struct ao *ao)
{
+ struct wasapi_state *state = (struct wasapi_state *)ao->priv;
+
if (state->pAudioClient)
IAudioClient_Stop(state->pAudioClient);
diff --git a/audio/out/ao_wasapi_utils.h b/audio/out/ao_wasapi_utils.h
index ee171ebb3c..41167b9189 100755
--- a/audio/out/ao_wasapi_utils.h
+++ b/audio/out/ao_wasapi_utils.h
@@ -38,7 +38,7 @@ int wasapi_validate_device(struct mp_log *log, const m_option_t *opt,
struct bstr name, struct bstr param);
int wasapi_thread_init(struct ao *ao);
-void wasapi_thread_uninit(wasapi_state *state);
+void wasapi_thread_uninit(struct ao *ao);
HRESULT wasapi_setup_proxies(wasapi_state *state);
void wasapi_release_proxies(wasapi_state *state);