[vlc-devel] commit: Revert "Preparser: yield the playlist (NSDRCID 1)" (Pierre d' Herbemont )

git version control git at videolan.org
Sun Jun 1 00:20:29 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Jun  1 00:21:29 2008 +0200| [231a36af4f787ee52033de936b8e7d2ed4f06732]

Revert "Preparser: yield the playlist (NSDRCID 1)"

This reverts commit f3b97438a7451c340b27446d687c6c5603a8323a.

It creates a circular reference holding. (playlist is the parent of the preparser and hold a reference to the preparser during all the preparser life's span).

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

 src/playlist/engine.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 626db4b..b8731e6 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -479,7 +479,7 @@ void playlist_LastLoop( playlist_t *p_playlist )
  */
 void playlist_PreparseLoop( playlist_preparse_t *p_obj )
 {
-    playlist_t *p_playlist = pl_Yield( p_obj );
+    playlist_t *p_playlist = (playlist_t *)p_obj->p_parent;
     input_item_t *p_current;
     int i_activity;
 
@@ -557,7 +557,6 @@ void playlist_PreparseLoop( playlist_preparse_t *p_obj )
         vlc_object_lock( p_obj );
     }
     vlc_object_unlock( p_obj );
-    pl_Release( p_obj );
 }
 
 /**




More information about the vlc-devel mailing list