[vlc-devel] commit: plqylist: Delete current playing item, if qpplicable, inside the PL_LOCK, and at the very end. (Pierre d'Herbemont )

git version control git at videolan.org
Tue Jul 15 07:48:11 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Tue Jul 15 01:25:39 2008 +0200| [0717f16a1e2bafc0e7fa196c7c7b238bdfb2ef82]

plqylist: Delete current playing item, if qpplicable, inside the PL_LOCK, and at the very end.

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

 src/playlist/engine.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 43340c9..5a6a90e 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -482,6 +482,18 @@ void playlist_LastLoop( playlist_t *p_playlist )
         sout_DeleteInstance( p_sout );
 #endif
 
+    /* Core should have terminated all SDs before the playlist */
+    /* TODO: It fails to do so when not playing anything -- Courmisch */
+    playlist_ServicesDiscoveryKillAll( p_playlist );
+    playlist_MLDump( p_playlist );
+
+    vlc_object_kill( p_playlist->p_preparse );
+    vlc_thread_join( p_playlist->p_preparse );
+    vlc_object_kill( p_playlist->p_fetcher );
+    vlc_thread_join( p_playlist->p_fetcher );
+
+    PL_LOCK;
+
     if( p_playlist->status.p_node &&
         p_playlist->status.p_node->i_flags & PLAYLIST_REMOVE_FLAG )
     {
@@ -499,17 +511,6 @@ void playlist_LastLoop( playlist_t *p_playlist )
          p_playlist->status.p_item = NULL;
     }
 
-    /* Core should have terminated all SDs before the playlist */
-    /* TODO: It fails to do so when not playing anything -- Courmisch */
-    playlist_ServicesDiscoveryKillAll( p_playlist );
-    playlist_MLDump( p_playlist );
-
-    vlc_object_kill( p_playlist->p_preparse );
-    vlc_thread_join( p_playlist->p_preparse );
-    vlc_object_kill( p_playlist->p_fetcher );
-    vlc_thread_join( p_playlist->p_fetcher );
-
-    PL_LOCK;
     FOREACH_ARRAY( playlist_item_t *p_del, p_playlist->all_items )
         free( p_del->pp_children );
         vlc_gc_decref( p_del->p_input );




More information about the vlc-devel mailing list