[vlc-commits] qt4: only use COM apartment thread for Shell Interfaces

Rémi Denis-Courmont git at videolan.org
Thu May 28 21:07:04 CEST 2015


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon May 25 18:59:52 2015 +0300| [c4b479a5d94ec3e84b3118a8cfe97aa076d24f13] | committer: Rémi Denis-Courmont

qt4: only use COM apartment thread for Shell Interfaces

(ref: MSDN KB 287087)

(cherry picked from commit e64a051e9a111306ab8b2ca0ac361b1801bc1772)

Conflicts:
	modules/gui/qt4/components/simple_preferences.cpp

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=c4b479a5d94ec3e84b3118a8cfe97aa076d24f13
---

 modules/gui/qt4/components/simple_preferences.cpp |    5 ++---
 modules/gui/qt4/main_interface_win32.cpp          |    4 +---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index 7764e3b..a946b0d 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -1274,9 +1274,8 @@ bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
 void SPrefsPanel::assoDialog()
 {
     HRESULT hr;
-    hr = CoInitializeEx( NULL, COINIT_MULTITHREADED );
-    if( hr == RPC_E_CHANGED_MODE )
-        hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
+
+    hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
     if( SUCCEEDED(hr) )
     {
         void *p;
diff --git a/modules/gui/qt4/main_interface_win32.cpp b/modules/gui/qt4/main_interface_win32.cpp
index af32cd4..19269f7 100644
--- a/modules/gui/qt4/main_interface_win32.cpp
+++ b/modules/gui/qt4/main_interface_win32.cpp
@@ -117,9 +117,7 @@ void MainInterface::createTaskBarButtons()
     p_taskbl = NULL;
     himl = NULL;
 
-    HRESULT hr = CoInitializeEx( NULL, COINIT_MULTITHREADED );
-    if( hr == RPC_E_CHANGED_MODE )
-        hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
+    HRESULT hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
     if( FAILED(hr) )
         return;
 



More information about the vlc-commits mailing list