[vlc-devel] commit: Preparser: yield the playlist (NSDRCID 1) ( Rémi Denis-Courmont )

Pierre d'Herbemont pdherbemont at free.fr
Sun Jun 1 00:02:25 CEST 2008


On May 31, 2008, at 11:01 PM, git version control wrote:

> vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com>  
> | Sun Jun  1 00:03:00 2008 +0300|  
> [f3b97438a7451c340b27446d687c6c5603a8323a]
>
> Preparser: yield the playlist (NSDRCID 1)
>
> (Not-So-Dumb-References-Checker IDentifier one)
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f3b97438a7451c340b27446d687c6c5603a8323a
> ---
>
> src/playlist/engine.c |    3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/playlist/engine.c b/src/playlist/engine.c
> index b8731e6..626db4b 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 = (playlist_t *)p_obj->p_parent;
> +    playlist_t *p_playlist = pl_Yield( p_obj );

In fact the fix is a bit more complex. This creates a circular  
reference holding between the playlist and the perparser. (The  
preparser holds a reference to the playlist, while the playlist holds  
a ref to the preparser).

Pierre.




More information about the vlc-devel mailing list