forked from len0rd/rockbox
Correct parsing of the ID3V2 extended header
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12970 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4c59c1a441
commit
a452f73e44
1 changed files with 5 additions and 8 deletions
|
|
@ -697,15 +697,12 @@ static void setid3v2title(int fd, struct mp3entry *entry)
|
||||||
if(version == ID3_VER_2_3) {
|
if(version == ID3_VER_2_3) {
|
||||||
if(10 != read(fd, header, 10))
|
if(10 != read(fd, header, 10))
|
||||||
return;
|
return;
|
||||||
/* The 2.3 extended header size doesn't include the following
|
/* The 2.3 extended header size doesn't include the header size
|
||||||
data, so we have to find out the size by checking the flags.
|
field itself. Also, it is not unsynched. */
|
||||||
Also, it is not unsynched. */
|
framelen =
|
||||||
framelen = bytes2int(header[0], header[1], header[2], header[3]) +
|
bytes2int(header[0], header[1], header[2], header[3]) + 4;
|
||||||
bytes2int(header[6], header[7], header[8], header[9]);
|
|
||||||
flags = bytes2int(0, 0, header[4], header[5]);
|
|
||||||
if(flags & 0x8000)
|
|
||||||
framelen += 4; /* CRC */
|
|
||||||
|
|
||||||
|
/* Skip the rest of the header */
|
||||||
lseek(fd, framelen - 10, SEEK_CUR);
|
lseek(fd, framelen - 10, SEEK_CUR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue