From 1076df4f99db2b814c3c7ec99b6e99932955bb59 Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Sun, 17 Aug 2008 12:31:32 +0000 Subject: 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 --- firmware/id3.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/firmware/id3.c b/firmware/id3.c index 8cbf40c483..3b7d165597 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; -- cgit v1.2.3