From ef7d6009b4f8b2e64d6ced27bc97aad0b520271e Mon Sep 17 00:00:00 2001 From: "roman.artiukhin" Date: Mon, 18 Sep 2023 13:17:11 +0300 Subject: 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 --- lib/rbcodec/codecs/aac.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/rbcodec/codecs/aac.c') diff --git a/lib/rbcodec/codecs/aac.c b/lib/rbcodec/codecs/aac.c index 8b06f5aa0e..0a4313e69e 100644 --- a/lib/rbcodec/codecs/aac.c +++ b/lib/rbcodec/codecs/aac.c @@ -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); -- cgit v1.2.3