Changeset 522baa537196376d0e517c68547a78bb830dddd7

Show
Ignore:
Timestamp:
05/29/08 18:08:49 (3 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1212077329 +0300
git-parent:

[e3fa003bfa151ec22840ae6c2047e7c468761092]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1212077329 +0300
Message:

Cleanup handling of thread-less interfaces

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/interface/interface.c

    r358c28c r522baa5  
    151151int intf_RunThread( intf_thread_t *p_intf ) 
    152152{ 
    153     /* This interface doesn't need to be run */ 
    154     if( p_intf->pf_run == NULL ) 
    155         return VLC_SUCCESS; 
    156  
    157153    /* Hack to get Mac OS X Cocoa runtime running 
    158154     * (it needs access to the main thread) */ 
     
    187183    /* Tell the interface to die */ 
    188184    vlc_object_kill( p_intf ); 
    189     if( p_intf->pf_run != NULL ) 
    190     { 
    191         vlc_cond_signal( &p_intf->object_wait ); 
    192         vlc_thread_join( p_intf ); 
    193     } 
     185    vlc_cond_signal( &p_intf->object_wait ); 
     186    vlc_thread_join( p_intf ); 
    194187} 
    195188 
     
    230223    { 
    231224        /* Give control to the interface */ 
    232         p_intf->pf_run( p_intf ); 
     225        if( p_intf->pf_run ) 
     226            p_intf->pf_run( p_intf ); 
     227        else 
     228            while( vlc_object_lock_and_wait( p_intf ) == 0 ); 
    233229 
    234230        /* Reset play on start status */ 
  • src/libvlc-common.c

    re3fa003 r522baa5  
    11511151    if( b_block ) 
    11521152    { 
    1153         /* FIXME: should be moved to interface/interface.c */ 
    1154         if( p_intf->pf_run ) 
    1155             vlc_thread_join( p_intf ); 
    1156         else 
    1157             while( vlc_object_lock_and_wait( p_intf ) == 0 ); 
    1158  
     1153        vlc_thread_join( p_intf ); 
    11591154        vlc_object_detach( p_intf ); 
    11601155        vlc_object_release( p_intf );