diff options
author | roman.artiukhin <bahusdrive@gmail.com> | 2023-08-31 18:51:16 +0300 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2023-10-02 12:54:57 -0400 |
commit | 7616822fbb0bbe9762fe2b6271982743ac8d114e (patch) | |
tree | f5cc0cf5b809380025a6131cee8f454997e44304 | |
parent | f017ef9617a584636c6c3df05383be37e2f1f549 (diff) | |
download | rockbox-7616822fbb.tar.gz rockbox-7616822fbb.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.c | 6 |
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) /* NeAACDecDecode may sometimes return NULL without setting error. */ if (ret == NULL || frame_info.error > 0) { LOGF("FAAD: decode error '%s'\n", NeAACDecGetErrorMessage(frame_info.error)); - return CODEC_ERROR; + + // 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 + if (file_offset > 0) + return CODEC_ERROR; } /* Advance codec buffer (no need to call set_offset because of this) */ |