diff options
author | Kevin Mitchell <kevmitch@gmail.com> | 2016-05-31 21:39:23 -0700 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2016-06-05 16:31:03 -0700 |
commit | b3e74f652ba5edd6f7d78cb17ea35395bf6c4a33 (patch) | |
tree | 694927183aa08a0571577cbcb27f2f70aea5dd9e /audio/out/ao_wasapi.c | |
parent | c1cb04b6a3f4fef43bf69b43b5cf7a1e770f3839 (diff) | |
download | mpv-b3e74f652ba5edd6f7d78cb17ea35395bf6c4a33.tar.bz2 mpv-b3e74f652ba5edd6f7d78cb17ea35395bf6c4a33.tar.xz |
ao_wasapi: initialize COM in main thread with MTA
Since the main thread is shared by other things in the player, using STA (single
threaded aparement) may have caused problems. Instead initialize in MTA
(multithreaded apartment).
Diffstat (limited to 'audio/out/ao_wasapi.c')
-rw-r--r-- | audio/out/ao_wasapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/ao_wasapi.c b/audio/out/ao_wasapi.c index eecfded9e1..ae6bd3d9dc 100644 --- a/audio/out/ao_wasapi.c +++ b/audio/out/ao_wasapi.c @@ -270,7 +270,7 @@ static void uninit(struct ao *ao) static int init(struct ao *ao) { MP_DBG(ao, "Init wasapi\n"); - CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + CoInitializeEx(NULL, COINIT_MULTITHREADED); struct wasapi_state *state = ao->priv; state->log = ao->log; @@ -469,7 +469,7 @@ static int hotplug_init(struct ao *ao) MP_DBG(ao, "Hotplug init\n"); struct wasapi_state *state = ao->priv; state->log = ao->log; - CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + CoInitializeEx(NULL, COINIT_MULTITHREADED); HRESULT hr = wasapi_change_init(ao, true); EXIT_ON_ERROR(hr); |