[vlc-commits] opus: use vlc_alloc helper
Thomas Guillem
git at videolan.org
Sat Nov 11 18:59:57 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:42:07 2017 +0100| [a2c868b30aa30d37c23ef5faacb9d97479173af1] | committer: Thomas Guillem
opus: use vlc_alloc helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a2c868b30aa30d37c23ef5faacb9d97479173af1
---
modules/codec/opus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/opus.c b/modules/codec/opus.c
index 7d354a8973..4bc70dc402 100644
--- a/modules/codec/opus.c
+++ b/modules/codec/opus.c
@@ -675,7 +675,7 @@ static int OpenEncoder(vlc_object_t *p_this)
/* Buffer for incoming audio, since opus only accepts frame sizes that are
multiples of 2.5ms */
enc->p_sys = sys;
- sys->buffer = malloc(OPUS_FRAME_SIZE * header.channels * sizeof(float));
+ sys->buffer = vlc_alloc(header.channels, sizeof(float) * OPUS_FRAME_SIZE);
if (!sys->buffer) {
status = VLC_ENOMEM;
goto error;
More information about the vlc-commits
mailing list