[vlc-devel] [PATCH] lua: input: fix uninitialized autoselect variable
Alexandre Janniaux
ajanni at videolabs.io
Thu Sep 5 01:58:14 CEST 2019
---
modules/lua/libs/input.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/lua/libs/input.c b/modules/lua/libs/input.c
index 6a4b14cf2e..1da99aa97a 100644
--- a/modules/lua/libs/input.c
+++ b/modules/lua/libs/input.c
@@ -639,7 +639,8 @@ static int vlclua_input_add_subtitle(lua_State *L, bool b_path)
if (!lua_isstring(L, 1))
return luaL_error( L, "vlc.player.add_subtitle() usage: (path)" );
- bool autoselect;
+ /* By default, it will select the track from the new associated media. */
+ bool autoselect = true;
if (lua_gettop(L) >= 2)
autoselect = lua_toboolean(L, 2);
--
2.23.0
More information about the vlc-devel
mailing list