summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/opus.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/opus.c')
-rw-r--r--lib/rbcodec/codecs/opus.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/rbcodec/codecs/opus.c b/lib/rbcodec/codecs/opus.c
index 3eb316de68..d72b9cc708 100644
--- a/lib/rbcodec/codecs/opus.c
+++ b/lib/rbcodec/codecs/opus.c
@@ -329,10 +329,8 @@ enum codec_status codec_run(void)
329 int64_t seek_target; 329 int64_t seek_target;
330 uint64_t granule_pos; 330 uint64_t granule_pos;
331 331
332 /* reset our simple malloc */ 332 ogg_malloc_init();
333 if (codec_init()) { 333
334 goto done;
335 }
336 global_stack = 0; 334 global_stack = 0;
337 335
338#if defined(CPU_COLDFIRE) 336#if defined(CPU_COLDFIRE)
@@ -344,10 +342,10 @@ enum codec_status codec_run(void)
344 /* pre-init the ogg_sync_state buffer, so it won't need many reallocs */ 342 /* pre-init the ogg_sync_state buffer, so it won't need many reallocs */
345 ogg_sync_init(&oy); 343 ogg_sync_init(&oy);
346 oy.storage = 64*1024; 344 oy.storage = 64*1024;
347 oy.data = codec_malloc(oy.storage); 345 oy.data = _ogg_malloc(oy.storage);
348 346
349 /* allocate output buffer */ 347 /* allocate output buffer */
350 uint16_t *output = (uint16_t*) codec_malloc(MAX_FRAME_SIZE*sizeof(uint16_t)); 348 uint16_t *output = (uint16_t*) _ogg_malloc(MAX_FRAME_SIZE*sizeof(uint16_t));
351 349
352 ci->seek_buffer(0); 350 ci->seek_buffer(0);
353 ci->set_elapsed(0); 351 ci->set_elapsed(0);
@@ -465,6 +463,7 @@ enum codec_status codec_run(void)
465 LOGF("Returned OK"); 463 LOGF("Returned OK");
466 error = CODEC_OK; 464 error = CODEC_OK;
467done: 465done:
466 ogg_malloc_destroy();
468 return error; 467 return error;
469} 468}
470 469