Commit 3690b371 authored by Sébastien Escudier's avatar Sébastien Escudier

dereference p_libvlc->p_vlm after the media clean up

(cherry picked from commit 88e497880b252bc2a73b8e14cd9b6c5ddc13bc77)
Signed-off-by: default avatarSébastien Escudier <sebastien-devel@celeos.eu>
parent fcd42e66
...@@ -214,16 +214,15 @@ void vlm_Delete( vlm_t *p_vlm ) ...@@ -214,16 +214,15 @@ void vlm_Delete( vlm_t *p_vlm )
vlc_mutex_lock( &vlm_mutex ); vlc_mutex_lock( &vlm_mutex );
assert( p_vlm->users > 0 ); assert( p_vlm->users > 0 );
if( --p_vlm->users == 0 ) if( --p_vlm->users == 0 )
{
assert( libvlc_priv(p_vlm->p_libvlc)->p_vlm == p_vlm ); assert( libvlc_priv(p_vlm->p_libvlc)->p_vlm == p_vlm );
libvlc_priv(p_vlm->p_libvlc)->p_vlm = NULL;
}
else else
p_vlm = NULL; p_vlm = NULL;
vlc_mutex_unlock( &vlm_mutex );
if( p_vlm == NULL ) if( p_vlm == NULL )
{
vlc_mutex_unlock( &vlm_mutex );
return; return;
}
/* Destroy and release VLM */ /* Destroy and release VLM */
vlc_mutex_lock( &p_vlm->lock ); vlc_mutex_lock( &p_vlm->lock );
...@@ -242,6 +241,9 @@ void vlm_Delete( vlm_t *p_vlm ) ...@@ -242,6 +241,9 @@ void vlm_Delete( vlm_t *p_vlm )
vlc_object_release( p_vlm->p_vod ); 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 ); vlc_mutex_lock( &p_vlm->lock_manage );
p_vlm->input_state_changed = true; p_vlm->input_state_changed = true;
vlc_cond_signal( &p_vlm->wait_manage ); vlc_cond_signal( &p_vlm->wait_manage );
......
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