]> git.sesse.net Git - vlc/commitdiff
playlist.c: removed potential deadlock and duplicate signalling
authorDamien Fouilleul <damienf@videolan.org>
Sun, 14 Oct 2007 20:21:56 +0000 (20:21 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Sun, 14 Oct 2007 20:21:56 +0000 (20:21 +0000)
src/playlist/engine.c
src/playlist/thread.c

index 04d82b80c45e666e2475ae76681556645efcbca0..1c818707024e62bb19df422c1a116ec8f6c33f30 100644 (file)
@@ -334,14 +334,14 @@ check_input:
              if( p_item == NULL )
              {
                 msg_Dbg( p_playlist, "nothing to play" );
+                p_playlist->status.i_status = PLAYLIST_STOPPED;
+                PL_UNLOCK
+
                 if( b_playexit == VLC_TRUE )
                 {
                     msg_Info( p_playlist, "end of playlist, exiting" );
                     vlc_object_kill( p_playlist->p_libvlc );
                 }
-                p_playlist->status.i_status = PLAYLIST_STOPPED;
-                PL_UNLOCK
-
                 ObjectGarbageCollector( p_playlist, VLC_TRUE );
                 return;
              }
index 30ae2858e5fddf499dba2423e4dd916892b5d7ce..94afef3a62cf9d614328df17ee0abab886601acb 100644 (file)
@@ -138,7 +138,6 @@ int playlist_ThreadDestroy( playlist_t * p_playlist )
 {
     // Tell playlist to go to last loop
     vlc_object_kill( p_playlist );
-    playlist_Signal( p_playlist );
 
     // Kill preparser
     if( p_playlist->p_preparse )