vlc_mutex_lock( &vlm_mutex );
assert( p_vlm->users > 0 );
if( --p_vlm->users == 0 )
- {
assert( libvlc_priv(p_vlm->p_libvlc)->p_vlm == p_vlm );
- libvlc_priv(p_vlm->p_libvlc)->p_vlm = NULL;
- }
else
p_vlm = NULL;
- vlc_mutex_unlock( &vlm_mutex );
if( p_vlm == NULL )
+ {
+ vlc_mutex_unlock( &vlm_mutex );
return;
+ }
/* Destroy and release VLM */
vlc_mutex_lock( &p_vlm->lock );
vlc_object_release( p_vlm->p_vod );
}
+ libvlc_priv(p_vlm->p_libvlc)->p_vlm = NULL;
+ vlc_mutex_unlock( &vlm_mutex );
+
vlc_mutex_lock( &p_vlm->lock_manage );
p_vlm->input_state_changed = true;
vlc_cond_signal( &p_vlm->wait_manage );