Commit 48ad4156 authored by Srikanth Raju's avatar Srikanth Raju

ML/Core: Destroy ML after PL deactivates, but before it destroys

parent 3a1efde2
......@@ -973,16 +973,6 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
libvlc_priv_t *priv = libvlc_priv (p_libvlc);
playlist_t *p_playlist = libvlc_priv (p_libvlc)->p_playlist;
#if defined(MEDIA_LIBRARY)
media_library_t* p_ml = priv->p_ml;
if( p_ml )
{
ml_Destroy( VLC_OBJECT( p_ml ) );
vlc_object_release( p_ml );
libvlc_priv(p_playlist->p_libvlc)->p_ml = NULL;
}
#endif
/* Deactivate the playlist */
msg_Dbg( p_libvlc, "deactivating the playlist" );
pl_Deactivate( p_libvlc );
......@@ -1004,6 +994,16 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
}
#endif
#if defined(MEDIA_LIBRARY)
media_library_t* p_ml = priv->p_ml;
if( p_ml )
{
ml_Destroy( VLC_OBJECT( p_ml ) );
vlc_object_release( p_ml );
libvlc_priv(p_playlist->p_libvlc)->p_ml = NULL;
}
#endif
/* Free playlist now, all threads are gone */
playlist_Destroy( p_playlist );
stats_TimersDumpAll( p_libvlc );
......
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