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
fff36451
Commit
fff36451
authored
May 18, 2012
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
luahttp: use us_tonumber() for commands passing decimals
This fixes playback rate, track delay and equalizer settings.
parent
78ee8bbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
share/lua/intf/modules/httprequests.lua
share/lua/intf/modules/httprequests.lua
+7
-2
No files found.
share/lua/intf/modules/httprequests.lua
View file @
fff36451
...
...
@@ -74,7 +74,7 @@ processcommands = function ()
local
id
=
tonumber
(
_GET
[
'id'
]
or
-
1
)
local
val
=
_GET
[
'val'
]
local
options
=
_GET
[
'option'
]
local
band
=
_GET
[
'band'
]
local
band
=
tonumber
(
_GET
[
'band'
])
if
type
(
options
)
~=
"table"
then
-- Deal with the 0 or 1 option case
options
=
{
options
}
end
...
...
@@ -158,14 +158,17 @@ processcommands = function ()
common
.
hotkey
(
"key-"
..
val
)
elseif
command
==
"audiodelay"
then
if
vlc
.
object
.
input
()
and
val
then
val
=
common
.
us_tonumber
(
val
)
vlc
.
var
.
set
(
vlc
.
object
.
input
(),
"audio-delay"
,
val
)
end
elseif
command
==
"rate"
then
if
vlc
.
object
.
input
()
and
tonumber
(
val
)
>=
0
then
val
=
common
.
us_tonumber
(
val
)
if
vlc
.
object
.
input
()
and
val
>=
0
then
vlc
.
var
.
set
(
vlc
.
object
.
input
(),
"rate"
,
val
)
end
elseif
command
==
"subdelay"
then
if
vlc
.
object
.
input
()
then
val
=
common
.
us_tonumber
(
val
)
vlc
.
var
.
set
(
vlc
.
object
.
input
(),
"spu-delay"
,
val
)
end
elseif
command
==
"aspectratio"
then
...
...
@@ -173,8 +176,10 @@ processcommands = function ()
vlc
.
var
.
set
(
vlc
.
object
.
vout
(),
"aspect-ratio"
,
val
)
end
elseif
command
==
"preamp"
then
val
=
common
.
us_tonumber
(
val
)
vlc
.
equalizer
.
preampset
(
val
)
elseif
command
==
"equalizer"
then
val
=
common
.
us_tonumber
(
val
)
vlc
.
equalizer
.
equalizerset
(
band
,
val
)
elseif
command
==
"enableeq"
then
if
val
==
'0'
then
vlc
.
equalizer
.
enable
(
false
)
else
vlc
.
equalizer
.
enable
(
true
)
end
...
...
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