summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2008-08-17 12:31:32 +0000
committerMagnus Holmgren <magnushol@gmail.com>2008-08-17 12:31:32 +0000
commit1076df4f99db2b814c3c7ec99b6e99932955bb59 (patch)
tree513c6c22401360ac59fe3d45f12e5b4e75dd06fe
parent509c06aa03b17b6330073e2db2170117aeea39e2 (diff)
downloadrockbox-1076df4f99db2b814c3c7ec99b6e99932955bb59.zip
rockbox-1076df4f99db2b814c3c7ec99b6e99932955bb59.tar.gz
rockbox-1076df4f99db2b814c3c7ec99b6e99932955bb59.tar.bz2
rockbox-1076df4f99db2b814c3c7ec99b6e99932955bb59.tar.xz
Fix a problem reading some ID3v2.4 tags. The data length refers to the size of the frame without compression, unsynchronization and the like, so it should not be used when skipping unsupported frames in the file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18304 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/id3.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/firmware/id3.c b/firmware/id3.c
index 8cbf40c..3b7d165 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -727,7 +727,6 @@ static void setid3v2title(int fd, struct mp3entry *entry)
int skip;
bool global_unsynch = false;
bool unsynch = false;
- int data_length_ind;
int i, j;
int rc;
@@ -851,7 +850,6 @@ static void setid3v2title(int fd, struct mp3entry *entry)
}
unsynch = false;
- data_length_ind = 0;
if(flags)
{
@@ -885,7 +883,7 @@ static void setid3v2title(int fd, struct mp3entry *entry)
if(4 != read(fd, tmp, 4))
return;
- data_length_ind = unsync(tmp[0], tmp[1], tmp[2], tmp[3]);
+ /* We don't need the data length */
framelen -= 4;
}
}
@@ -1016,9 +1014,6 @@ static void setid3v2title(int fd, struct mp3entry *entry)
if(global_unsynch && version <= ID3_VER_2_3) {
size -= skip_unsynched(fd, totframelen);
} else {
- if(data_length_ind)
- totframelen = data_length_ind;
-
size -= totframelen;
if( lseek(fd, totframelen, SEEK_CUR) == -1 )
return;