Commit dbded71f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix race condition in screensaver exit

parent ec99b9d9
...@@ -138,17 +138,14 @@ static void Run( intf_thread_t *p_intf ) ...@@ -138,17 +138,14 @@ static void Run( intf_thread_t *p_intf )
p_intf->p_sys->p_connection = dbus_init( p_intf ); p_intf->p_sys->p_connection = dbus_init( p_intf );
#endif #endif
vlc_object_lock( p_intf );
for(;;) for(;;)
{ {
vlc_object_t *p_vout; vlc_object_t *p_vout;
vlc_bool_t b_quit; vlc_bool_t b_quit;
/* Check screensaver every 30 seconds */ /* Check screensaver every 30 seconds */
vlc_object_lock( p_intf ); if( vlc_object_timedwait( p_intf, mdate() + 30000000 ) < 0 )
b_quit = vlc_object_timedwait( p_intf, mdate() + 30000000 ) < 0;
vlc_object_unlock( p_intf );
if( b_quit )
break; break;
p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE ); p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
...@@ -180,6 +177,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -180,6 +177,7 @@ static void Run( intf_thread_t *p_intf )
} }
} }
} }
vlc_object_unlock( p_intf );
} }
#ifdef HAVE_DBUS #ifdef HAVE_DBUS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment