[vlc-devel] [PATCH 4/8] opus: no need to cast malloc in C
Rafaël Carré
funman at videolan.org
Sat Sep 21 16:54:31 CEST 2013
---
modules/codec/opus.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/codec/opus.c b/modules/codec/opus.c
index 7d29740..fa96d2c 100644
--- a/modules/codec/opus.c
+++ b/modules/codec/opus.c
@@ -610,8 +610,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 = (float *) malloc(OPUS_FRAME_SIZE * header.channels *
- sizeof(float));
+ sys->buffer = malloc(OPUS_FRAME_SIZE * header.channels * sizeof(float));
if (!sys->buffer)
{
opus_multistream_encoder_destroy(sys->enc);
--
1.8.1.2
More information about the vlc-devel
mailing list