1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
roman.artiukhin 2023-08-31 18:51:16 +03:00 committed by Aidan MacDonald
parent f017ef9617
commit 7616822fbb

View file

@ -211,6 +211,10 @@ enum codec_status codec_run(void)
/* NeAACDecDecode may sometimes return NULL without setting error. */ /* NeAACDecDecode may sometimes return NULL without setting error. */
if (ret == NULL || frame_info.error > 0) { if (ret == NULL || frame_info.error > 0) {
LOGF("FAAD: decode error '%s'\n", NeAACDecGetErrorMessage(frame_info.error)); LOGF("FAAD: decode error '%s'\n", NeAACDecGetErrorMessage(frame_info.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; return CODEC_ERROR;
} }