summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroman.artiukhin <bahusdrive@gmail.com>2023-08-31 18:51:16 +0300
committerAidan MacDonald <amachronic@protonmail.com>2023-10-02 12:54:57 -0400
commit7616822fbb0bbe9762fe2b6271982743ac8d114e (patch)
treef5cc0cf5b809380025a6131cee8f454997e44304
parentf017ef9617a584636c6c3df05383be37e2f1f549 (diff)
downloadrockbox-7616822fbb0bbe9762fe2b6271982743ac8d114e.tar.gz
rockbox-7616822fbb0bbe9762fe2b6271982743ac8d114e.zip
Codecs: mp4: Ignore decode errors till next chunk present in lookup_table
In files with gaps between chunks and reduced lookup_table we can't properly detect all gaps in m4a_check_sample_offset. So just ignore decode errors till next chunk present in lookup_table Change-Id: I317864dce6a2251cdb6ddb8c0ad4d7c1640cb7a1
-rw-r--r--lib/rbcodec/codecs/aac.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rbcodec/codecs/aac.c b/lib/rbcodec/codecs/aac.c
index 15c75708e1..1f5165ad05 100644
--- a/lib/rbcodec/codecs/aac.c
+++ b/lib/rbcodec/codecs/aac.c
@@ -211,7 +211,11 @@ enum codec_status codec_run(void)
211 /* NeAACDecDecode may sometimes return NULL without setting error. */ 211 /* NeAACDecDecode may sometimes return NULL without setting error. */
212 if (ret == NULL || frame_info.error > 0) { 212 if (ret == NULL || frame_info.error > 0) {
213 LOGF("FAAD: decode error '%s'\n", NeAACDecGetErrorMessage(frame_info.error)); 213 LOGF("FAAD: decode error '%s'\n", NeAACDecGetErrorMessage(frame_info.error));
214 return CODEC_ERROR; 214
215 // In files with gaps between chunks and reduced lookup_table we can't properly detect all gaps
216 // in m4a_check_sample_offset. So just ignore decode errors till next chunk present in lookup_table
217 if (file_offset > 0)
218 return CODEC_ERROR;
215 } 219 }
216 220
217 /* Advance codec buffer (no need to call set_offset because of this) */ 221 /* Advance codec buffer (no need to call set_offset because of this) */