[vlc-devel] commit: Fix mutex cancellation. (Antoine Cellerier )
git version control
git at videolan.org
Mon Dec 21 21:56:12 CET 2009
vlc | branch: master | Antoine Cellerier <antoine at macbook.(none)> | Sun Dec 20 15:06:22 2009 +0100| [b601fe0adff74d9497d6a6150bc6a8f96854e63a] | committer: Antoine Cellerier
Fix mutex cancellation.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b601fe0adff74d9497d6a6150bc6a8f96854e63a
---
modules/misc/lua/libs/misc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/misc/lua/libs/misc.c b/modules/misc/lua/libs/misc.c
index e5a1f02..e92da8c 100644
--- a/modules/misc/lua/libs/misc.c
+++ b/modules/misc/lua/libs/misc.c
@@ -181,9 +181,10 @@ static int vlclua_lock_and_wait( lua_State *L )
intf_sys_t *p_sys = p_intf->p_sys;
vlc_mutex_lock( &p_sys->lock );
+ mutex_cleanup_push( &p_sys->lock );
while( !p_sys->exiting )
vlc_cond_wait( &p_sys->wait, &p_sys->lock );
- vlc_mutex_unlock( &p_sys->lock );
+ vlc_cleanup_pop();
lua_pushboolean( L, 1 );
return 1;
}
More information about the vlc-devel
mailing list