summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/aac.c
diff options
context:
space:
mode:
authorroman.artiukhin <bahusdrive@gmail.com>2023-09-18 13:17:11 +0300
committerSolomon Peachy <pizza@shaftnet.org>2023-09-19 11:13:19 -0400
commitef7d6009b4f8b2e64d6ced27bc97aad0b520271e (patch)
tree76b3d5ddc1257223fd5dcbb7169028738b577656 /lib/rbcodec/codecs/aac.c
parentf96f7cd9419c5140bd00c85c9d3b81e1e07a1105 (diff)
downloadrockbox-ef7d6009b4f8b2e64d6ced27bc97aad0b520271e.tar.gz
rockbox-ef7d6009b4f8b2e64d6ced27bc97aad0b520271e.zip
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
Diffstat (limited to 'lib/rbcodec/codecs/aac.c')
-rw-r--r--lib/rbcodec/codecs/aac.c7
1 files changed, 1 insertions, 6 deletions
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)
202 { 202 {
203 ci->advance_buffer(file_offset - ci->curpos); 203 ci->advance_buffer(file_offset - ci->curpos);
204 } 204 }
205 else if (file_offset == 0) 205
206 {
207 LOGF("AAC: get_sample_offset error\n");
208 return CODEC_ERROR;
209 }
210
211 /* Request the required number of bytes from the input buffer */ 206 /* Request the required number of bytes from the input buffer */
212 buffer=ci->request_buffer(&n, FAAD_BYTE_BUFFER_SIZE); 207 buffer=ci->request_buffer(&n, FAAD_BYTE_BUFFER_SIZE);
213 208