Changeset 3d7eabaf80eb76dc2111f399aec6586d1b0094a8

Show
Ignore:
Timestamp:
05/14/08 21:39:21 (2 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1210793961 +0200
git-parent:

[bb84da65bde754021ec602e99e3861b7e8ebafa3]

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

Remove playlist destructor

We need to do stuff BEFORE the playlist is destroyed

Files:

Legend:

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

    r82921f3 r3d7eaba  
    3939 *****************************************************************************/ 
    4040static void VariablesInit( playlist_t *p_playlist ); 
    41 static void playlist_Destructor( vlc_object_t * p_this ); 
    4241 
    4342static int RandomCallback( vlc_object_t *p_this, char const *psz_cmd, 
     
    155154    p_playlist->b_auto_preparse = true; 
    156155 
    157     vlc_object_set_destructor( p_playlist, playlist_Destructor ); 
    158  
    159156    return p_playlist; 
    160157} 
     
    169166void playlist_Destroy( playlist_t *p_playlist ) 
    170167{ 
    171     /* XXX: should go in the playlist destructor */ 
    172168    var_Destroy( p_playlist, "intf-change" ); 
    173169    var_Destroy( p_playlist, "item-change" ); 
     
    182178    var_Destroy( p_playlist, "activity" ); 
    183179 
     180    if( p_playlist->p_preparse ) 
     181        vlc_object_release( p_playlist->p_preparse ); 
     182    if( p_playlist->p_fetcher ) 
     183        vlc_object_release( p_playlist->p_fetcher ); 
     184 
    184185    vlc_object_release( p_playlist ); 
    185 } 
    186  
    187 static void playlist_Destructor( vlc_object_t * p_this ) 
    188 { 
    189     playlist_t * p_playlist = (playlist_t *)p_this; 
    190  
    191     // Kill preparser 
    192     if( p_playlist->p_preparse ) 
    193     { 
    194         vlc_object_release( p_playlist->p_preparse ); 
    195     } 
    196  
    197     // Kill meta fetcher 
    198     if( p_playlist->p_fetcher ) 
    199     { 
    200         vlc_object_release( p_playlist->p_fetcher ); 
    201     } 
    202186} 
    203187