Skip to content
Snippets Groups Projects
Commit 0abd1b0d authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Makes the allocation more C++-friendly

parent ebec87a2
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ int main(int _argc,char **_argv){
else
seed = time(NULL);
/*Testing encoding of raw bit values.*/
ptr = malloc(DATA_SIZE);
ptr = (unsigned char *)malloc(DATA_SIZE);
ec_enc_init(&enc,ptr, DATA_SIZE);
for(ft=2;ft<1024;ft++){
for(i=0;i<ft;i++){
......
......@@ -31,7 +31,7 @@ int main(void)
unsigned char *ptr;
int val[10000], decay[10000];
ALLOC_STACK;
ptr = malloc(DATA_SIZE);
ptr = (unsigned char *)malloc(DATA_SIZE);
ec_enc_init(&enc,ptr,DATA_SIZE);
val[0] = 3; decay[0] = 6000;
......
......@@ -201,7 +201,7 @@ OpusMSEncoder *opus_multistream_encoder_create(
)
{
int ret;
OpusMSEncoder *st = opus_alloc(opus_multistream_encoder_get_size(streams, coupled_streams));
OpusMSEncoder *st = (OpusMSEncoder *)opus_alloc(opus_multistream_encoder_get_size(streams, coupled_streams));
if (st==NULL)
{
if (error)
......@@ -510,7 +510,7 @@ OpusMSDecoder *opus_multistream_decoder_create(
)
{
int ret;
OpusMSDecoder *st = opus_alloc(opus_multistream_decoder_get_size(streams, coupled_streams));
OpusMSDecoder *st = (OpusMSDecoder *)opus_alloc(opus_multistream_decoder_get_size(streams, coupled_streams));
if (st==NULL)
{
if (error)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment