Changeset e6629c22f31e82f36c71b971b62f14fd0a8971b1

Show
Ignore:
Timestamp:
16/09/07 12:40:28 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1189939228 +0000
git-parent:

[0ca3790ea7cd23e1134853a8818ab33ffb54baa2]

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

Use the new object locking API

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/misc/screensaver.c

    r1508936 re6629c2  
    141141#endif 
    142142 
    143     while( !b_quit ) 
    144     { 
     143    for(;;) 
     144    { 
     145        vlc_object_t *p_vout; 
     146        vlc_bool_t b_quit; 
     147 
    145148        /* Check screensaver every 30 seconds */ 
    146         vlc_mutex_lock( &p_intf->object_lock ); 
    147         vlc_cond_timedwait( &p_intf->object_wait, &p_intf->object_lock, 
    148                             mdate() + 30000000 ); 
    149         b_quit = p_intf->b_die; 
    150         vlc_mutex_unlock( &p_intf->object_lock ); 
    151  
    152         vlc_object_t *p_vout; 
     149        vlc_object_lock( p_intf ); 
     150        b_quit = vlc_object_timedwait( p_intf, mdate() + 30000000 ) < 0; 
     151        vlc_object_unlock( p_intf ); 
     152 
     153        if( b_quit ) 
     154            break; 
     155 
    153156        p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE ); 
    154157