Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
a5a33334
Commit
a5a33334
authored
May 06, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: input_AddSubtitle expects a file path, not an URL (fixes #11449)
parent
2ddd0f3e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
modules/lua/libs/input.c
modules/lua/libs/input.c
+3
-3
share/lua/README.txt
share/lua/README.txt
+1
-1
share/lua/intf/modules/httprequests.lua
share/lua/intf/modules/httprequests.lua
+1
-1
No files found.
modules/lua/libs/input.c
View file @
a5a33334
...
...
@@ -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
;
}
...
...
share/lua/README.txt
View file @
a5a33334
...
...
@@ -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.
...
...
share/lua/intf/modules/httprequests.lua
View file @
a5a33334
...
...
@@ -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
(
v
lc
.
strings
.
make_uri
(
val
)
)
vlc
.
input
.
add_subtitle
(
v
al
)
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment