[vlc-devel] [PATCH] Fixing Qt volume control fails on Windows 7

Rémi Denis-Courmont remi at remlab.net
Fri Oct 12 10:22:09 CEST 2012


This cannot work. WASAPI is accessing the same COM objects from multiple 
threads for performance reasons.

Le jeudi 11 octobre 2012 21:22:30, Yuri Pin a écrit :
> ---
>  modules/audio_output/wasapi.c |    3 +++
>  1 file changed, 3 insertions(+)
>  mode change 100644 => 100755 modules/audio_output/wasapi.c
> 
> diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
> old mode 100644
> new mode 100755
> index 73e9de0..9107197
> --- a/modules/audio_output/wasapi.c
> +++ b/modules/audio_output/wasapi.c
> @@ -90,6 +90,9 @@ static int TryEnter(vlc_object_t *obj)
>  {
>      HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
>      if (unlikely(FAILED(hr)))
> +        hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
> +
> +    if (unlikely(FAILED(hr)))
>      {
>          msg_Err (obj, "cannot initialize COM (error 0x%lx)", hr);
>          return -1;

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list