[vlc-commits] ML/Core: Destroy ML after PL deactivates, but before it destroys

Srikanth Raju git at videolan.org
Mon Jan 24 17:35:09 CET 2011


vlc | branch: master | Srikanth Raju <srikiraju at gmail.com> | Mon Jan 24 21:50:57 2011 +0530| [48ad41562fedb2ae4631b0c5b573228d23f724da] | committer: Srikanth Raju

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=48ad41562fedb2ae4631b0c5b573228d23f724da
---

 src/libvlc.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index 718f7a7..270701d 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -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 );



More information about the vlc-commits mailing list