Changeset a15af1b90a7ee88f76a1f67c1fdd13efe885a564

Show
Ignore:
Timestamp:
05/07/08 19:48:38 (3 months ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1215280118 +0200
git-parent:

[b0d34dd091e493f5c1cc4940ece339d4dda775bb]

git-author:
Pierre d'Herbemont <pdherbemont@videolan.org> 1215279170 +0200
Message:

macosx: Make sure we don't leak an input_thread_t.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/macosx/intf.h

    rb94083f ra15af1b  
    6767{ 
    6868    NSAutoreleasePool * o_pool; 
    69  
    70     /* the current input */ 
    71     input_thread_t * p_input; 
    7269 
    7370    /* special actions */ 
  • modules/gui/macosx/intf.m

    r560016e ra15af1b  
    11331133{ 
    11341134    playlist_t * p_playlist; 
     1135    input_thread_t * p_input = NULL; 
    11351136 
    11361137    /* new thread requires a new pool */ 
     
    11541155        vlc_mutex_lock( &p_intf->change_lock ); 
    11551156 
    1156         if( p_intf->p_sys->p_input == NULL
    1157         { 
    1158             p_intf->p_sys->p_input = playlist_CurrentInput( p_playlist ); 
     1157        if( !p_input
     1158        { 
     1159            p_input = playlist_CurrentInput( p_playlist ); 
    11591160 
    11601161            /* Refresh the interface */ 
    1161             if( p_intf->p_sys->p_input ) 
     1162            if( p_input ) 
    11621163            { 
    11631164                msg_Dbg( p_intf, "input has changed, refreshing interface" ); 
     
    11651166            } 
    11661167        } 
    1167         else if( !vlc_object_alive (p_intf->p_sys->p_input) || p_intf->p_sys->p_input->b_dead ) 
     1168        else if( !vlc_object_alive (p_input) || p_input->b_dead ) 
    11681169        { 
    11691170            /* input stopped */ 
     
    11711172            p_intf->p_sys->i_play_status = END_S; 
    11721173            msg_Dbg( p_intf, "input has stopped, refreshing interface" ); 
    1173             vlc_object_release( p_intf->p_sys->p_input ); 
    1174             p_intf->p_sys->p_input = NULL; 
     1174            vlc_object_release( p_input ); 
     1175            p_input = NULL; 
    11751176        } 
    11761177 
     
    11841185    vlc_object_unlock( p_intf ); 
    11851186    [o_pool release]; 
     1187 
     1188    if( p_input ) vlc_object_release( p_input ); 
    11861189 
    11871190    var_DelCallback( p_playlist, "playlist-current", PlaylistChanged, self );