Commit a2c868b3 authored by Thomas Guillem's avatar Thomas Guillem

opus: use vlc_alloc helper

parent 911c6ea1
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment