Changeset 0e3e5da42643cac283fc0e758147351635679abf

Show
Ignore:
Timestamp:
05/14/08 22:28:20 (2 months ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1210796900 +0200
git-parent:

[5bfd7ba2d5743010ea14e1fc3afc6c36f3ba2adc]

git-author:
Rafaël Carré <funman@videolan.org> 1210794555 +0200
Message:

Revert "Remove playlist destructor"

This reverts commit 3d7eabaf80eb76dc2111f399aec6586d1b0094a8.

Signed-off-by: Pierre d'Herbemont <pdherbemont@videolan.org>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/playlist/engine.c

    r3d7eaba r0e3e5da  
    3939 *****************************************************************************/ 
    4040static void VariablesInit( playlist_t *p_playlist ); 
     41static void playlist_Destructor( vlc_object_t * p_this ); 
    4142 
    4243static int RandomCallback( vlc_object_t *p_this, char const *psz_cmd, 
     
    154155    p_playlist->b_auto_preparse = true; 
    155156 
     157    vlc_object_set_destructor( p_playlist, playlist_Destructor ); 
     158 
    156159    return p_playlist; 
    157160} 
     
    166169void playlist_Destroy( playlist_t *p_playlist ) 
    167170{ 
     171    /* XXX: should go in the playlist destructor */ 
    168172    var_Destroy( p_playlist, "intf-change" ); 
    169173    var_Destroy( p_playlist, "item-change" ); 
     
    178182    var_Destroy( p_playlist, "activity" ); 
    179183 
     184    vlc_object_release( p_playlist ); 
     185} 
     186 
     187static void playlist_Destructor( vlc_object_t * p_this ) 
     188{ 
     189    playlist_t * p_playlist = (playlist_t *)p_this; 
     190 
     191    // Kill preparser 
    180192    if( p_playlist->p_preparse ) 
     193    { 
    181194        vlc_object_release( p_playlist->p_preparse ); 
     195    } 
     196 
     197    // Kill meta fetcher 
    182198    if( p_playlist->p_fetcher ) 
     199    { 
    183200        vlc_object_release( p_playlist->p_fetcher ); 
    184  
    185     vlc_object_release( p_playlist ); 
     201    } 
    186202} 
    187203