[vlc-commits] lua: input: fix uninitialized autoselect variable

Alexandre Janniaux git at videolan.org
Mon Sep 23 13:39:33 CEST 2019


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Fri Sep 20 16:16:21 2019 +0200| [361428f8583fbdc12f1e423d74fba2ddcabfcee2] | committer: Thomas Guillem

lua: input: fix uninitialized autoselect variable

Issued from c9e2717771dfe0c519e51dc7b03c197bd805069c refactor.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

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



More information about the vlc-commits mailing list