[vlc-commits] equalizer: use vlc_alloc helper
Thomas Guillem
git at videolan.org
Sat Nov 11 18:59:50 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:40:48 2017 +0100| [fe555b400431171173c3e0ea38b1d4d93514ac2c] | committer: Thomas Guillem
equalizer: use vlc_alloc helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fe555b400431171173c3e0ea38b1d4d93514ac2c
---
modules/audio_filter/equalizer.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/audio_filter/equalizer.c b/modules/audio_filter/equalizer.c
index 735b2be572..f83d4599ca 100644
--- a/modules/audio_filter/equalizer.c
+++ b/modules/audio_filter/equalizer.c
@@ -291,9 +291,9 @@ static int EqzInit( filter_t *p_filter, int i_rate )
/* Create the static filter config */
p_sys->i_band = cfg.i_band;
- p_sys->f_alpha = malloc( p_sys->i_band * sizeof(float) );
- p_sys->f_beta = malloc( p_sys->i_band * sizeof(float) );
- p_sys->f_gamma = malloc( p_sys->i_band * sizeof(float) );
+ p_sys->f_alpha = vlc_alloc( p_sys->i_band, sizeof(float) );
+ p_sys->f_beta = vlc_alloc( p_sys->i_band, sizeof(float) );
+ p_sys->f_gamma = vlc_alloc( p_sys->i_band, sizeof(float) );
if( !p_sys->f_alpha || !p_sys->f_beta || !p_sys->f_gamma )
goto error;
@@ -307,7 +307,7 @@ static int EqzInit( filter_t *p_filter, int i_rate )
/* Filter dyn config */
p_sys->b_2eqz = false;
p_sys->f_gamp = 1.0f;
- p_sys->f_amp = malloc( p_sys->i_band * sizeof(float) );
+ p_sys->f_amp = vlc_alloc( p_sys->i_band, sizeof(float) );
if( !p_sys->f_amp )
goto error;
More information about the vlc-commits
mailing list