]> git.sesse.net Git - vlc/blobdiff - src/playlist/engine.c
dejidjei:
[vlc] / src / playlist / engine.c
index 152b48b18c7042a0dce1f2763278db880ea59932..90b552663a5667b5001daee45de00f941dc429dd 100644 (file)
@@ -233,6 +233,7 @@ void playlist_release_current_input( playlist_t * p_playlist )
 
     /* Release the playlist lock, because we may get stuck
      * in vlc_object_release() for some time. */
+    printf("_______ releasing\n");
     PL_UNLOCK;
     vlc_object_release( p_input );
     PL_LOCK;
@@ -487,6 +488,14 @@ void playlist_LastLoop( playlist_t *p_playlist )
          playlist_ItemDelete( p_playlist->status.p_node );
          p_playlist->status.p_node = NULL;
     }
+    if( p_playlist->status.p_item &&
+        p_playlist->status.p_item->i_flags & PLAYLIST_REMOVE_FLAG )
+    {
+         PL_DEBUG( "%s was marked for deletion, deleting",
+                         PLI_NAME( p_playlist->status.p_item  ) );
+         playlist_ItemDelete( p_playlist->status.p_item );
+         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 */
@@ -593,6 +602,13 @@ void playlist_PreparseLoop( playlist_preparse_t *p_obj )
         msleep( (i_activity+1) * 1000 );
         vlc_object_lock( p_obj );
     }
+
+    for( int i = 0; i < p_obj->i_waiting; i++ )
+    {
+        vlc_gc_decref( p_obj->pp_waiting[i] );
+        REMOVE_ELEM( p_obj->pp_waiting, p_obj->i_waiting, 0 );
+    }
+
     vlc_object_unlock( p_obj );
 }
 
@@ -674,6 +690,13 @@ void playlist_FetcherLoop( playlist_fetcher_t *p_obj )
         msleep( (i_activity+1) * 1000 );
         vlc_object_lock( p_obj );
     }
+
+    for( int i = 0; i < p_obj->i_waiting; i++ )
+    {
+        vlc_gc_decref( p_obj->pp_waiting[i] );
+        REMOVE_ELEM( p_obj->pp_waiting, p_obj->i_waiting, 0 );
+    }
+
     vlc_object_unlock( p_obj );
 }