mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +02:00
Lua: input_AddSubtitle expects a file path, not an URL (fixes #11449)
This commit is contained in:
parent
2ddd0f3eb3
commit
a5a33334e8
@ -218,9 +218,9 @@ static int vlclua_input_add_subtitle( lua_State *L )
|
||||
if( !p_input )
|
||||
return luaL_error( L, "can't add subtitle: no current input" );
|
||||
if( !lua_isstring( L, 1 ) )
|
||||
return luaL_error( L, "vlc.input.add_subtitle() usage: (url)" );
|
||||
const char *psz_url = luaL_checkstring( L, 1 );
|
||||
input_AddSubtitle( p_input, psz_url, false );
|
||||
return luaL_error( L, "vlc.input.add_subtitle() usage: (path)" );
|
||||
const char *psz_path = luaL_checkstring( L, 1 );
|
||||
input_AddSubtitle( p_input, psz_path, false );
|
||||
vlc_object_release( p_input );
|
||||
return 1;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ h:redirect( url_dst, url_src ): Redirect all connections from url_src to url_dst
|
||||
Input
|
||||
-----
|
||||
input.is_playing(): Return true if input exists.
|
||||
input.add_subtitle(url): Add a subtitle to the current input
|
||||
input.add_subtitle(url): Add a subtitle file (by path) to the current input
|
||||
input.item(): Get the current input item. Input item methods are:
|
||||
:uri(): Get item's URI.
|
||||
:name(): Get item's name.
|
||||
|
@ -91,7 +91,7 @@ processcommands = function ()
|
||||
--]]
|
||||
vlc.playlist.add({{path=vlc.strings.make_uri(input),options=options,name=name,duration=duration}})
|
||||
elseif command == "addsubtitle" then
|
||||
vlc.input.add_subtitle (vlc.strings.make_uri(val))
|
||||
vlc.input.add_subtitle (val)
|
||||
elseif command == "in_enqueue" then
|
||||
vlc.playlist.enqueue({{path=vlc.strings.make_uri(input),options=options,name=name,duration=duration}})
|
||||
elseif command == "pl_play" then
|
||||
|
Loading…
Reference in New Issue
Block a user