[vlc-commits] lua: add missing player lock

Pierre Lamot git at videolan.org
Thu Oct 8 09:45:36 CEST 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Oct  5 15:54:28 2020 +0200| [16f171590e270137a495533e7ec281dd6b7ddb43] | committer: Pierre Lamot

lua: add missing player lock

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=16f171590e270137a495533e7ec281dd6b7ddb43
---

 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);
 



More information about the vlc-commits mailing list