Commit 004a16fb authored by ivoire's avatar ivoire

Factorize.

parent c5af2987
......@@ -2003,6 +2003,7 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
module_config_t *p_item;
bool b_audio = false;
char *psz_device = NULL;
int i_ret = VLC_SUCCESS;
if( !EMPTY_STR( newval.psz_string ) )
psz_device = strdup( newval.psz_string );
......@@ -2046,19 +2047,15 @@ static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
}
else
{
/* Uninitialize OLE/COM */
CoUninitialize();
msg_Err( p_this, "didn't find device: %s", devicename.c_str() );
free( psz_device );
return VLC_EGENERIC;
i_ret = VLC_EGENERIC;
}
/* Uninitialize OLE/COM */
CoUninitialize();
free( psz_device );
return VLC_SUCCESS;
return i_ret;
}
/*****************************************************************************
......
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