Commit ac1c62c8 authored by Rémi Duraffort's avatar Rémi Duraffort

Add missing CoUninitialize.

For each CoInitialize we have to call CoUninitialize.
parent c90fc1d0
......@@ -2016,6 +2016,7 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
if( !p_item )
{
free( psz_device );
CoUninitialize();
return VLC_SUCCESS;
}
......@@ -2034,7 +2035,11 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
/* Enumerate devices */
FindCaptureDevice( p_this, NULL, &list_devices, b_audio );
if( !list_devices.size() ) return VLC_EGENERIC;
if( !list_devices.size() )
{
CoUninitialize();
return VLC_EGENERIC;
}
devicename = *list_devices.begin();
}
......
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