[vlc-commits] lua: release lock earlier when querying playlist status
Pierre Ynard
git at videolan.org
Wed Nov 23 15:32:28 CET 2016
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Wed Nov 23 15:31:39 2016 +0100| [bf9003a0ac736b0b8798e34e6051880a4f9d24a4] | committer: Pierre Ynard
lua: release lock earlier when querying playlist status
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bf9003a0ac736b0b8798e34e6051880a4f9d24a4
---
modules/lua/libs/playlist.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/lua/libs/playlist.c b/modules/lua/libs/playlist.c
index 1246448..b3e2f9d 100644
--- a/modules/lua/libs/playlist.c
+++ b/modules/lua/libs/playlist.c
@@ -364,7 +364,9 @@ static int vlclua_playlist_status( lua_State *L )
{
playlist_t *p_playlist = vlclua_get_playlist_internal( L );
PL_LOCK;
- switch( playlist_Status( p_playlist ) )
+ int status = playlist_Status( p_playlist );
+ PL_UNLOCK;
+ switch( status )
{
case PLAYLIST_STOPPED:
lua_pushliteral( L, "stopped" );
@@ -379,7 +381,6 @@ static int vlclua_playlist_status( lua_State *L )
lua_pushliteral( L, "unknown" );
break;
}
- PL_UNLOCK;
return 1;
}
More information about the vlc-commits
mailing list