diff options
Diffstat (limited to 'apps/codecs/libfaad/specrec.c')
-rw-r--r-- | apps/codecs/libfaad/specrec.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/apps/codecs/libfaad/specrec.c b/apps/codecs/libfaad/specrec.c index b5c8305237..200239bddc 100644 --- a/apps/codecs/libfaad/specrec.c +++ b/apps/codecs/libfaad/specrec.c | |||
@@ -808,11 +808,14 @@ uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, | |||
808 | hDecoder->sbr[ele] = sbrDecodeInit(hDecoder->frameLength, | 808 | hDecoder->sbr[ele] = sbrDecodeInit(hDecoder->frameLength, |
809 | hDecoder->element_id[ele], ele, | 809 | hDecoder->element_id[ele], ele, |
810 | 2*get_sample_rate(hDecoder->sf_index), | 810 | 2*get_sample_rate(hDecoder->sf_index), |
811 | hDecoder->downSampledSBR | 811 | hDecoder->downSampledSBR, 0); |
812 | #ifdef DRM | 812 | #ifndef FAAD_STATIC_ALLOC |
813 | , 0 | 813 | if (hDecoder->sbr[ele] == NULL) |
814 | { | ||
815 | /* could not allocate memory */ | ||
816 | return 28; | ||
817 | } | ||
814 | #endif | 818 | #endif |
815 | ); | ||
816 | } | 819 | } |
817 | 820 | ||
818 | if (sce->ics1.window_sequence == EIGHT_SHORT_SEQUENCE) | 821 | if (sce->ics1.window_sequence == EIGHT_SHORT_SEQUENCE) |
@@ -1058,11 +1061,14 @@ uint8_t reconstruct_channel_pair(NeAACDecHandle hDecoder, ic_stream *ics1, ic_st | |||
1058 | hDecoder->sbr[ele] = sbrDecodeInit(hDecoder->frameLength, | 1061 | hDecoder->sbr[ele] = sbrDecodeInit(hDecoder->frameLength, |
1059 | hDecoder->element_id[ele], ele, | 1062 | hDecoder->element_id[ele], ele, |
1060 | 2*get_sample_rate(hDecoder->sf_index), | 1063 | 2*get_sample_rate(hDecoder->sf_index), |
1061 | hDecoder->downSampledSBR | 1064 | hDecoder->downSampledSBR, 0); |
1062 | #ifdef DRM | 1065 | #ifndef FAAD_STATIC_ALLOC |
1063 | , 0 | 1066 | if (hDecoder->sbr[ele] == NULL) |
1067 | { | ||
1068 | /* could not allocate memory */ | ||
1069 | return 28; | ||
1070 | } | ||
1064 | #endif | 1071 | #endif |
1065 | ); | ||
1066 | } | 1072 | } |
1067 | 1073 | ||
1068 | if (cpe->ics1.window_sequence == EIGHT_SHORT_SEQUENCE) | 1074 | if (cpe->ics1.window_sequence == EIGHT_SHORT_SEQUENCE) |