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
a4c19fb2
Commit
a4c19fb2
authored
Aug 30, 2011
by
Akash Mehrotra
Committed by
Jean-Baptiste Kempf
Aug 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
luahttp, equalizer: Fix warnings
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
ee1e329e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
modules/lua/libs/equalizer.c
modules/lua/libs/equalizer.c
+11
-8
No files found.
modules/lua/libs/equalizer.c
View file @
a4c19fb2
...
...
@@ -171,15 +171,17 @@ static int vlclua_equalizer_get( lua_State *L )
{
level
=
strtof
(
psz_bands
,
&
psz_bands
);
bands
--
;
asprintf
(
&
str
,
"%f"
,
level
);
if
(
asprintf
(
&
str
,
"%f"
,
level
)
==
-
1
)
return
0
;
lua_pushstring
(
L
,
str
);
free
(
str
);
asprintf
(
&
str
,
"band_%d"
,
i
++
);
if
(
asprintf
(
&
str
,
"band_%d"
,
i
++
)
==
-
1
)
return
0
;
lua_setfield
(
L
,
-
2
,
str
);
free
(
str
);
}
free
(
psz_bands_origin
);
if
(
loc
!=
(
locale_t
)
0
)
if
(
loc
!=
(
locale_t
)
0
)
{
uselocale
(
oldloc
);
freelocale
(
loc
);
...
...
@@ -195,7 +197,7 @@ static int vlclua_equalizer_get( lua_State *L )
static
int
vlclua_equalizer_set
(
lua_State
*
L
)
{
int
bandid
=
luaL_checknumber
(
L
,
1
);
if
(
bandid
<
0
||
bandid
>
9
)
if
(
bandid
<
0
||
bandid
>
9
)
return
0
;
input_thread_t
*
p_input
=
vlclua_get_input_internal
(
L
);
if
(
!
p_input
)
...
...
@@ -252,12 +254,12 @@ static int vlclua_equalizer_setpreset( lua_State *L )
{
audio_output_t
*
p_aout
=
input_GetAout
(
p_input
);
vlc_object_release
(
p_input
);
if
(
!
p_aout
)
if
(
!
p_aout
)
{
return
0
;
}
char
*
psz_af
=
var_GetNonEmptyString
(
p_aout
,
"audio-filter"
);
if
(
!
psz_af
||
strstr
(
psz_af
,
"equalizer"
)
==
NULL
)
if
(
!
psz_af
||
strstr
(
psz_af
,
"equalizer"
)
==
NULL
)
{
vlc_object_release
(
p_aout
);
return
0
;
...
...
@@ -267,7 +269,7 @@ static int vlclua_equalizer_setpreset( lua_State *L )
return
0
;
for
(
int
i
=
1
;
i
<
10
;
i
++
)
{
if
(
asprintf
(
&
newstr
,
"%s%6.1f"
,
newstr
,
eqz_preset_10b
[
presetid
].
f_amp
[
i
])
==
-
1
)
if
(
asprintf
(
&
newstr
,
"%s%6.1f"
,
newstr
,
eqz_preset_10b
[
presetid
].
f_amp
[
i
])
==
-
1
)
return
0
;
}
var_SetString
(
p_aout
,
"equalizer-bands"
,
newstr
);
...
...
@@ -300,7 +302,8 @@ static int vlclua_equalizer_get_presets( lua_State *L )
for
(
int
i
=
0
;
i
<
NB_PRESETS
;
i
++
)
{
lua_pushstring
(
L
,
preset_list_text
[
i
]
);
asprintf
(
&
str
,
"id_%d"
,
i
);
if
(
asprintf
(
&
str
,
"id_%d"
,
i
)
==
-
1
)
return
0
;
lua_setfield
(
L
,
-
2
,
str
);
free
(
str
);
}
...
...
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