Commit e002f487 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

libvlc: Destroy libvlc's vlm instance before the stats destruction to avoid input crashes.

parent 4c905528
...@@ -970,6 +970,12 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) ...@@ -970,6 +970,12 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
aout_Delete( p_aout ); aout_Delete( p_aout );
} }
/* Destroy VLM if created in libvlc_InternalInit */
if( p_libvlc->p_vlm )
{
vlm_Delete( p_libvlc->p_vlm );
}
/* Free interaction */ /* Free interaction */
msg_Dbg( p_libvlc, "removing interaction" ); msg_Dbg( p_libvlc, "removing interaction" );
vlc_object_release( p_libvlc->p_interaction ); vlc_object_release( p_libvlc->p_interaction );
...@@ -998,12 +1004,6 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) ...@@ -998,12 +1004,6 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
vlc_mutex_destroy( &p_libvlc->p_stats->lock ); vlc_mutex_destroy( &p_libvlc->p_stats->lock );
FREENULL( p_libvlc->p_stats ); FREENULL( p_libvlc->p_stats );
/* Destroy VLM if created in libvlc_InternalInit */
if( p_libvlc->p_vlm )
{
vlm_Delete( p_libvlc->p_vlm );
}
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
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