summaryrefslogtreecommitdiff
path: root/apps/codecs/aac.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/aac.c')
-rw-r--r--apps/codecs/aac.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/codecs/aac.c b/apps/codecs/aac.c
index 60460355da..7d706f4fd8 100644
--- a/apps/codecs/aac.c
+++ b/apps/codecs/aac.c
@@ -53,6 +53,7 @@ enum codec_status codec_main(void)
53 int err; 53 int err;
54 uint32_t s = 0; 54 uint32_t s = 0;
55 unsigned char c = 0; 55 unsigned char c = 0;
56 void *ret;
56 57
57 /* Generic codec initialisation */ 58 /* Generic codec initialisation */
58 ci->configure(DSP_SET_STEREO_MODE, STEREO_NONINTERLEAVED); 59 ci->configure(DSP_SET_STEREO_MODE, STEREO_NONINTERLEAVED);
@@ -179,11 +180,10 @@ next_track:
179 buffer=ci->request_buffer(&n,sample_byte_size); 180 buffer=ci->request_buffer(&n,sample_byte_size);
180 181
181 /* Decode one block - returned samples will be host-endian */ 182 /* Decode one block - returned samples will be host-endian */
182 NeAACDecDecode(decoder, &frame_info, buffer, n); 183 ret = NeAACDecDecode(decoder, &frame_info, buffer, n);
183 /* Ignore return value, we access samples in the decoder struct 184
184 * directly. 185 /* NeAACDecDecode may sometimes return NULL without setting error. */
185 */ 186 if (ret == NULL || frame_info.error > 0) {
186 if (frame_info.error > 0) {
187 LOGF("FAAD: decode error '%s'\n", NeAACDecGetErrorMessage(frame_info.error)); 187 LOGF("FAAD: decode error '%s'\n", NeAACDecGetErrorMessage(frame_info.error));
188 err = CODEC_ERROR; 188 err = CODEC_ERROR;
189 goto done; 189 goto done;