Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
44370bcc
Commit
44370bcc
authored
Aug 11, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memleak, check return value.
parent
cef16536
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
modules/audio_filter/equalizer.c
modules/audio_filter/equalizer.c
+10
-0
No files found.
modules/audio_filter/equalizer.c
View file @
44370bcc
...
...
@@ -172,9 +172,14 @@ static int Open( vlc_object_t *p_this )
/* Allocate structure */
p_sys
=
p_filter
->
p_sys
=
malloc
(
sizeof
(
aout_filter_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
if
(
EqzInit
(
p_filter
,
p_filter
->
input
.
i_rate
)
)
{
free
(
p_sys
);
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
...
...
@@ -358,12 +363,15 @@ static int EqzInit( aout_filter_t *p_filter, int i_rate )
PreampCallback
(
VLC_OBJECT
(
p_aout
),
NULL
,
val3
,
val3
,
p_sys
);
p_sys
->
b_first
=
false
;
free
(
val1
.
psz_string
);
/* Register preset bands (for intf) if : */
/* We have no bands info --> the preset info must be given to the intf */
/* or The bands info matches the preset */
if
(
p_sys
->
psz_newbands
==
NULL
)
{
msg_Err
(
p_filter
,
"No preset selected"
);
free
(
val2
.
psz_string
);
return
(
VLC_EGENERIC
);
}
if
(
(
*
(
val2
.
psz_string
)
&&
...
...
@@ -373,6 +381,7 @@ static int EqzInit( aout_filter_t *p_filter, int i_rate )
if
(
p_sys
->
f_newpreamp
==
p_sys
->
f_gamp
)
var_SetFloat
(
p_aout
,
"equalizer-preamp"
,
p_sys
->
f_newpreamp
);
}
free
(
val2
.
psz_string
);
/* Add our own callbacks */
var_AddCallback
(
p_aout
,
"equalizer-preset"
,
PresetCallback
,
p_sys
);
...
...
@@ -467,6 +476,7 @@ static void EqzClean( aout_filter_t *p_filter )
free
(
p_sys
->
f_gamma
);
free
(
p_sys
->
f_amp
);
free
(
p_sys
->
psz_newbands
);
}
...
...
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