[vlc-devel] [PATCH 1/2] lua: input: fix uninitialized autoselect variable
    Alexandre Janniaux 
    ajanni at videolabs.io
       
    Fri Sep 20 16:16:21 CEST 2019
    
    
  
Issued from c9e2717771dfe0c519e51dc7b03c197bd805069c refactor.
---
 modules/lua/libs/input.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/lua/libs/input.c b/modules/lua/libs/input.c
index 6a4b14cf2e..4be132ecba 100644
--- a/modules/lua/libs/input.c
+++ b/modules/lua/libs/input.c
@@ -637,9 +637,9 @@ static int vlclua_input_add_subtitle(lua_State *L, bool b_path)
     vlc_player_t *player = vlclua_get_player_internal(L);
     if (!lua_isstring(L, 1))
-        return luaL_error( L, "vlc.player.add_subtitle() usage: (path)" );
+        return luaL_error( L, "vlc.player.add_subtitle() usage: (path, autoselect=false)" );
-    bool autoselect;
+    bool autoselect = false;
     if (lua_gettop(L) >= 2)
         autoselect = lua_toboolean(L, 2);
--
2.23.0
    
    
More information about the vlc-devel
mailing list