[vlc-commits] spatialaudio: use vlc_alloc helper

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


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:40:37 2017 +0100| [9ddb89c4b5379fab0467c243c0b089549b99b13b] | committer: Thomas Guillem

spatialaudio: use vlc_alloc helper

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

 modules/audio_filter/channel_mixer/spatialaudio.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/audio_filter/channel_mixer/spatialaudio.cpp b/modules/audio_filter/channel_mixer/spatialaudio.cpp
index 09b869b2e1..2414dfa582 100644
--- a/modules/audio_filter/channel_mixer/spatialaudio.cpp
+++ b/modules/audio_filter/channel_mixer/spatialaudio.cpp
@@ -284,7 +284,7 @@ static int allocateBuffers(filter_sys_t *p_sys)
 
     for (unsigned i = 0; i < p_sys->i_inputNb; ++i)
     {
-        p_sys->inBuf[i] = (float *)malloc(AMB_BLOCK_TIME_LEN * sizeof(float));
+        p_sys->inBuf[i] = (float *)vlc_alloc(AMB_BLOCK_TIME_LEN, sizeof(float));
         if (p_sys->inBuf[i] == NULL)
             return VLC_ENOMEM;
     }
@@ -295,7 +295,7 @@ static int allocateBuffers(filter_sys_t *p_sys)
 
     for (unsigned i = 0; i < p_sys->i_outputNb; ++i)
     {
-        p_sys->outBuf[i] = (float *)malloc(AMB_BLOCK_TIME_LEN * sizeof(float));
+        p_sys->outBuf[i] = (float *)vlc_alloc(AMB_BLOCK_TIME_LEN, sizeof(float));
         if (p_sys->outBuf[i] == NULL)
             return VLC_ENOMEM;
     }



More information about the vlc-commits mailing list