Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
b0536aba
Commit
b0536aba
authored
Jul 15, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/audio_filter/equalizer.c: fixed segfault in BandsCallback().
parent
9105991c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
modules/audio_filter/equalizer.c
modules/audio_filter/equalizer.c
+10
-14
No files found.
modules/audio_filter/equalizer.c
View file @
b0536aba
...
...
@@ -573,12 +573,11 @@ static void EqzClean( aout_filter_t *p_filter )
free
(
p_sys
->
f_gamma
);
free
(
p_sys
->
f_amp
);
}
static
int
PresetCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
aout_instance_t
*
p_aout
=
(
aout_instance_t
*
)
p_this
;
...
...
@@ -631,7 +630,7 @@ static int PresetCallback( vlc_object_t *p_this, char const *psz_cmd,
}
static
int
PreampCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
...
...
@@ -645,32 +644,29 @@ static int PreampCallback( vlc_object_t *p_this, char const *psz_cmd,
}
static
int
BandsCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
aout_filter_sys_t
*
p_sys
=
(
aout_filter_sys_t
*
)
p_data
;
char
*
psz_bands
=
newval
.
psz_string
;
/* Same thing for bands */
if
(
*
psz_bands
)
{
char
*
p
=
psz_bands
;
char
*
p
=
psz_bands
,
p_next
;
int
i
;
for
(
i
=
0
;
i
<
p_sys
->
i_band
;
i
++
)
{
float
f
;
/* Read dB -20/20*/
f
=
strtof
(
p
,
&
p
);
/* Read dB -20/20 */
float
f
=
strtof
(
p
,
&
p_next
);
if
(
!
p_next
||
p_next
==
p
)
break
;
/* strtof() failed */
p_sys
->
f_amp
[
i
]
=
EqzConvertdB
(
f
);
if
(
p
==
NULL
)
break
;
if
(
!*
p
)
break
;
/* end of line */
p
++
;
if
(
*
p
==
'\0'
)
break
;
}
}
return
VLC_SUCCESS
;
}
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