[vlc-devel] commit: inhibit: fix another instance of the killed-before-wait race ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat May 31 17:59:28 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat May 31 18:45:22 2008 +0300| [cb56da1c4061ac2b22378e085a5253f0d94d95b0]
inhibit: fix another instance of the killed-before-wait race
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb56da1c4061ac2b22378e085a5253f0d94d95b0
---
modules/misc/inhibit.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/misc/inhibit.c b/modules/misc/inhibit.c
index bbf69eb..49406c4 100644
--- a/modules/misc/inhibit.c
+++ b/modules/misc/inhibit.c
@@ -227,13 +227,12 @@ static int UnInhibit( intf_thread_t *p_intf )
static void Run( intf_thread_t *p_intf )
{
vlc_object_lock( p_intf );
- for(;;)
+ while( vlc_object_alive( p_intf ) )
{
input_thread_t *p_input;
/* Check playing state every 30 seconds */
- if( vlc_object_timedwait( p_intf, mdate() + 30000000 ) < 0 )
- break;
+ vlc_object_timedwait( p_intf, mdate() + 30000000 );
p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
if( p_input )
More information about the vlc-devel
mailing list