1
0
Fork 0
forked from len0rd/rockbox

Codecs: mp4: Optimize m4a_check_sample_offset

Make optimization from 2358fabb actually work.
Fix potential out of bound access.
Remove redundant zero offset check.

Change-Id: I0a0ba04670b612d410ac17a761bd08c2915721b9
This commit is contained in:
roman.artiukhin 2023-09-18 13:17:11 +03:00 committed by Solomon Peachy
parent f96f7cd941
commit ef7d6009b4
2 changed files with 10 additions and 12 deletions

View file

@ -202,12 +202,7 @@ enum codec_status codec_run(void)
{
ci->advance_buffer(file_offset - ci->curpos);
}
else if (file_offset == 0)
{
LOGF("AAC: get_sample_offset error\n");
return CODEC_ERROR;
}
/* Request the required number of bytes from the input buffer */
buffer=ci->request_buffer(&n, FAAD_BYTE_BUFFER_SIZE);