if( p_vout )
{
if( !p_intf->psz_switch_intf )
+ {
if( vout_Control( p_vout, VOUT_CLOSE ) != VLC_SUCCESS )
vout_Control( p_vout, VOUT_REPARENT );
+ }
else
+ {
if( vout_Control( p_vout, VOUT_REPARENT ) != VLC_SUCCESS )
vout_Control( p_vout, VOUT_CLOSE );
+ }
}
p_intf->pf_request_window = NULL;
break;
}
+ /* Make sure the old interface is completely uninitialized */
+ module_Unneed( p_intf, p_intf->p_module );
+
/* Provide ability to switch the main interface on the fly */
psz_intf = p_intf->psz_switch_intf;
p_intf->psz_switch_intf = NULL;
- /* Make sure the old interface is completely uninitialized */
- module_Unneed( p_intf, p_intf->p_module );
-
vlc_mutex_lock( &p_intf->object_lock );
p_intf->b_die = VLC_FALSE;
p_intf->b_dead = VLC_FALSE;