- if (size2 <= 16 || atom_cmp(type2, "data")) {
- p += size1;
- continue;
- }
- size2 -= 16;
- q = p + ret + ret2 + 8;
- if (q + size2 > buf + buflen)
- break;
- if (!atom_cmp(type1, "\xa9" "ART"))
- afhi->tags.artist = get_tag(q, size2);
- else if (!atom_cmp(type1, "\xa9" "alb"))
- afhi->tags.album = get_tag(q, size2);
- else if (!atom_cmp(type1, "\xa9" "nam"))
- afhi->tags.title = get_tag(q, size2);
- else if (!atom_cmp(type1, "\xa9" "cmt"))
- afhi->tags.comment = get_tag(q, size2);
- else if (!atom_cmp(type1, "\xa9" "day"))
- afhi->tags.year = get_tag(q, size2);
- p += size1;
+ afhi->max_chunk_size = 0;
+ for (n = 0; n < afhi->chunks_total; n++) {
+ ret = aac_afh_get_chunk(n, c, &buf, &len);
+ if (ret < 0)
+ goto out;
+ afhi->max_chunk_size = PARA_MAX(afhi->max_chunk_size, len);