[vlc-devel] [PATCH] lua: add missing player lock

Pierre Lamot pierre at videolabs.io
Tue Oct 6 09:16:18 CEST 2020


---
 modules/lua/libs/input.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/lua/libs/input.c b/modules/lua/libs/input.c
index 9cae145854..39bc12511a 100644
--- a/modules/lua/libs/input.c
+++ b/modules/lua/libs/input.c
@@ -645,7 +645,9 @@ static int vlclua_input_add_subtitle(lua_State *L, bool b_path)
         mrl = vlc_path2uri(sub, NULL);
 
     const char *uri = b_path ? mrl : sub;
+    vlc_player_Lock(player);
     vlc_player_AddAssociatedMedia(player, SPU_ES, uri, autoselect, true, false);
+    vlc_player_Unlock(player);
     if (b_path)
         free(mrl);
 
-- 
2.25.1



More information about the vlc-devel mailing list