if (padd->consumed_total < padd->offset[0])
padd->consumed = padd->offset[0] - padd->consumed_total;
}
- p = memchr(padd->inbuf + padd->consumed, 0x21,
- padd->inbuf_len - padd->consumed);
- if (!p) {
- padd->consumed = padd->inbuf_len;
+ for (; padd->consumed < padd->inbuf_len; padd->consumed++)
+ if ((padd->inbuf[padd->consumed] & 0xfe) == 0x20)
+ break;
+ if (padd->consumed >= padd->inbuf_len)
goto success;
- }
- if (p != padd->inbuf + padd->consumed) {
- int skip = p - padd->inbuf + padd->consumed;
- PARA_DEBUG_LOG("skipping %d bytes in inbuffer\n", skip);
- padd->consumed += skip;
- }
+ p = padd->inbuf + padd->consumed;
+// PARA_NOTICE_LOG("p[0]: %lx\n", (long unsigned) *p);
outbuffer = NeAACDecDecode(padd->decoder, &padd->frame_info, p,
len - padd->consumed);
ret = -E_AAC_DECODE;