Commit 0ff3d0e6 authored by Srikanth Raju's avatar Srikanth Raju

ML/Core: Release ML before playlist deactivates

ML holds some PL resources
parent 456b99c4
...@@ -973,6 +973,16 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) ...@@ -973,6 +973,16 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
libvlc_priv_t *priv = libvlc_priv (p_libvlc); libvlc_priv_t *priv = libvlc_priv (p_libvlc);
playlist_t *p_playlist = libvlc_priv (p_libvlc)->p_playlist; 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 */ /* Deactivate the playlist */
msg_Dbg( p_libvlc, "deactivating the playlist" ); msg_Dbg( p_libvlc, "deactivating the playlist" );
pl_Deactivate( p_libvlc ); pl_Deactivate( p_libvlc );
...@@ -996,17 +1006,6 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) ...@@ -996,17 +1006,6 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
/* Free playlist now, all threads are gone */ /* Free playlist now, all threads are gone */
playlist_Destroy( p_playlist ); playlist_Destroy( 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
stats_TimersDumpAll( p_libvlc ); stats_TimersDumpAll( p_libvlc );
stats_TimersCleanAll( p_libvlc ); stats_TimersCleanAll( 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