diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2015-12-29 01:13:17 -0800 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2016-01-04 07:41:21 -0800 |
commit | efb99436370fdb60e4b816dcbaf6bb20d853627b (patch) | |
tree | 34914766602d692bc7b49a379af5e29b3b8d67c5 /audio/out/ao_wasapi_utils.c | |
parent | 243a2976a8721283e8c6ff1e6cb77230762fe9ab (diff) | |
download | mpv-efb99436370fdb60e4b816dcbaf6bb20d853627b.tar.bz2 mpv-efb99436370fdb60e4b816dcbaf6bb20d853627b.tar.xz |
ao_wasapi: make persistent enumerator local to change_notify
This is no longer required by anything else
Diffstat (limited to 'audio/out/ao_wasapi_utils.c')
-rwxr-xr-x | audio/out/ao_wasapi_utils.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index fc2f8bb7aa..c68b276120 100755 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -1101,13 +1101,7 @@ HRESULT wasapi_thread_init(struct ao *ao) MP_DBG(ao, "Init wasapi thread\n"); int64_t retry_wait = 1; retry: ; - - HRESULT hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, - &IID_IMMDeviceEnumerator, - (void **)&state->pEnumerator); - EXIT_ON_ERROR(hr); - - hr = find_device(ao); + HRESULT hr = find_device(ao); EXIT_ON_ERROR(hr); hr = load_device(ao->log, &state->pDevice, state->deviceID); @@ -1170,7 +1164,6 @@ void wasapi_thread_uninit(struct ao *ao) SAFE_RELEASE(state->pAudioClient, IAudioClient_Release(state->pAudioClient)); SAFE_RELEASE(state->pDevice, IMMDevice_Release(state->pDevice)); SAFE_RELEASE(state->deviceID, talloc_free(state->deviceID)); - SAFE_RELEASE(state->pEnumerator, IMMDeviceEnumerator_Release(state->pEnumerator)); SAFE_RELEASE(state->hTask, AvRevertMmThreadCharacteristics(state->hTask)); MP_DBG(ao, "Thread uninit done\n"); } |