summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2007-03-30 12:55:46 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2007-03-30 12:55:46 +0000
commita452f73e4415c74745d80a3b85272380661a92ed (patch)
treeac72c259a813670773792133bbbf3ae08f8ea53d /firmware
parent4c59c1a4416389e68620eb37d11c30959ac82940 (diff)
downloadrockbox-a452f73e4415c74745d80a3b85272380661a92ed.tar.gz
rockbox-a452f73e4415c74745d80a3b85272380661a92ed.zip
Correct parsing of the ID3V2 extended header
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12970 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/id3.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index 11ae683ee3..eaaf2a9ecd 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -697,15 +697,12 @@ static void setid3v2title(int fd, struct mp3entry *entry)
if(version == ID3_VER_2_3) {
if(10 != read(fd, header, 10))
return;
- /* The 2.3 extended header size doesn't include the following
- data, so we have to find out the size by checking the flags.
- Also, it is not unsynched. */
- framelen = bytes2int(header[0], header[1], header[2], header[3]) +
- bytes2int(header[6], header[7], header[8], header[9]);
- flags = bytes2int(0, 0, header[4], header[5]);
- if(flags & 0x8000)
- framelen += 4; /* CRC */
+ /* The 2.3 extended header size doesn't include the header size
+ field itself. Also, it is not unsynched. */
+ framelen =
+ bytes2int(header[0], header[1], header[2], header[3]) + 4;
+ /* Skip the rest of the header */
lseek(fd, framelen - 10, SEEK_CUR);
}