[vlc-commits] scaletempo: use vlc_alloc helper

Thomas Guillem git at videolan.org
Sat Nov 11 18:59:53 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:41:04 2017 +0100| [bf1fcc36ccf29a7772ff16dbe5e268f087db54e8] | committer: Thomas Guillem

scaletempo: use vlc_alloc helper

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bf1fcc36ccf29a7772ff16dbe5e268f087db54e8
---

 modules/audio_filter/scaletempo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/audio_filter/scaletempo.c b/modules/audio_filter/scaletempo.c
index f0e9c5a1db..26f57f0096 100644
--- a/modules/audio_filter/scaletempo.c
+++ b/modules/audio_filter/scaletempo.c
@@ -323,8 +323,8 @@ static int reinit_buffers( filter_t *p_filter )
         p->samples_overlap  = frames_overlap * p->samples_per_frame;
         p->bytes_standing   = p->bytes_stride - p->bytes_overlap;
         p->samples_standing = p->bytes_standing / p->bytes_per_sample;
-        p->buf_overlap      = malloc( p->bytes_overlap );
-        p->table_blend      = malloc( p->samples_overlap * 4 ); /* sizeof (int32|float) */
+        p->buf_overlap      = vlc_alloc( 1, p->bytes_overlap );
+        p->table_blend      = vlc_alloc( 4, p->samples_overlap ); /* sizeof (int32|float) */
         if( !p->buf_overlap || !p->table_blend )
             return VLC_ENOMEM;
         if( p->bytes_overlap > prev_overlap )



More information about the vlc-commits mailing list