Commit 0bbd5859 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: use MTA apartment for COM (fixes #6880)

parent 6a258c95
......@@ -2015,7 +2015,8 @@ static int FindDevices( vlc_object_t *p_this, const char *psz_name,
{
/* Find list of devices */
list<string> list_devices;
if( SUCCEEDED(CoInitializeEx( NULL, COINIT_APARTMENTTHREADED )) )
if( SUCCEEDED(CoInitializeEx( NULL, COINIT_MULTITTHREADED ))
|| SUCCEEDED(CoInitializeEx( NULL, COINIT_APARTMENTTHREADED )) )
{
bool b_audio = !strcmp( psz_name, CFG_PREFIX "adev" );
......@@ -2055,7 +2056,8 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
char *psz_device = NULL;
int i_ret = VLC_SUCCESS;
if( FAILED(CoInitializeEx( NULL, COINIT_APARTMENTTHREADED )) )
if( FAILED(CoInitializeEx( NULL, COINIT_MULTITTHREADED ))
&& FAILED(CoInitializeEx( NULL, COINIT_APARTMENTTHREADED )) )
return VLC_EGENERIC;
if( !EMPTY_STR( newval.psz_string ) )
......
......@@ -935,7 +935,7 @@ bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
void SPrefsPanel::assoDialog()
{
IApplicationAssociationRegistrationUI *p_appassoc;
CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
CoInitializeEx( NULL, COINIT_MULTITTHREADED );
if( S_OK == CoCreateInstance(CLSID_ApplicationAssociationRegistrationUI,
NULL, CLSCTX_INPROC_SERVER,
......
......@@ -79,7 +79,7 @@ void MainInterface::createTaskBarButtons()
FIXME:the play button's picture doesn't changed to pause when clicked
*/
CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
CoInitializeEx( NULL, COINIT_MULTITHREADED );
if( S_OK == CoCreateInstance( CLSID_TaskbarList,
NULL, CLSCTX_INPROC_SERVER,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment