diff options
Diffstat (limited to 'apps/codecs/libfaad/decoder.c')
-rw-r--r-- | apps/codecs/libfaad/decoder.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/codecs/libfaad/decoder.c b/apps/codecs/libfaad/decoder.c index 05d788597e..caedda7f55 100644 --- a/apps/codecs/libfaad/decoder.c +++ b/apps/codecs/libfaad/decoder.c | |||
@@ -346,6 +346,11 @@ int32_t NEAACDECAPI NeAACDecInit(NeAACDecHandle hDecoder, uint8_t *buffer, | |||
346 | hDecoder->time_out[i] = s_time_buf_2048[i]; | 346 | hDecoder->time_out[i] = s_time_buf_2048[i]; |
347 | #else | 347 | #else |
348 | hDecoder->time_out[i] = (real_t*)faad_malloc(2*FRAME_LEN*sizeof(real_t)); | 348 | hDecoder->time_out[i] = (real_t*)faad_malloc(2*FRAME_LEN*sizeof(real_t)); |
349 | if (hDecoder->time_out[i] == NULL) | ||
350 | { | ||
351 | /* could not allocate memory */ | ||
352 | return -1; | ||
353 | } | ||
349 | #endif | 354 | #endif |
350 | memset(hDecoder->time_out[i], 0, 2*FRAME_LEN); | 355 | memset(hDecoder->time_out[i], 0, 2*FRAME_LEN); |
351 | hDecoder->sbr_alloced[hDecoder->fr_ch_ele] = 1; | 356 | hDecoder->sbr_alloced[hDecoder->fr_ch_ele] = 1; |
@@ -469,6 +474,11 @@ int8_t NEAACDECAPI NeAACDecInit2(NeAACDecHandle hDecoder, uint8_t *pBuffer, | |||
469 | hDecoder->time_out[i] = s_time_buf_2048[i]; | 474 | hDecoder->time_out[i] = s_time_buf_2048[i]; |
470 | #else | 475 | #else |
471 | hDecoder->time_out[i] = (real_t*)faad_malloc(2*FRAME_LEN*sizeof(real_t)); | 476 | hDecoder->time_out[i] = (real_t*)faad_malloc(2*FRAME_LEN*sizeof(real_t)); |
477 | if (hDecoder->time_out[i] == NULL) | ||
478 | { | ||
479 | /* could not allocate memory */ | ||
480 | return -1; | ||
481 | } | ||
472 | #endif | 482 | #endif |
473 | memset(hDecoder->time_out[i], 0, 2*FRAME_LEN); | 483 | memset(hDecoder->time_out[i], 0, 2*FRAME_LEN); |
474 | hDecoder->sbr_alloced[hDecoder->fr_ch_ele] = 1; | 484 | hDecoder->sbr_alloced[hDecoder->fr_ch_ele] = 1; |