1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Magnus Holmgren 2008-08-17 12:31:32 +00:00
parent 509c06aa03
commit 1076df4f99

View file

@ -727,7 +727,6 @@ static void setid3v2title(int fd, struct mp3entry *entry)
int skip; int skip;
bool global_unsynch = false; bool global_unsynch = false;
bool unsynch = false; bool unsynch = false;
int data_length_ind;
int i, j; int i, j;
int rc; int rc;
@ -851,7 +850,6 @@ static void setid3v2title(int fd, struct mp3entry *entry)
} }
unsynch = false; unsynch = false;
data_length_ind = 0;
if(flags) if(flags)
{ {
@ -885,7 +883,7 @@ static void setid3v2title(int fd, struct mp3entry *entry)
if(4 != read(fd, tmp, 4)) if(4 != read(fd, tmp, 4))
return; return;
data_length_ind = unsync(tmp[0], tmp[1], tmp[2], tmp[3]); /* We don't need the data length */
framelen -= 4; framelen -= 4;
} }
} }
@ -1016,9 +1014,6 @@ static void setid3v2title(int fd, struct mp3entry *entry)
if(global_unsynch && version <= ID3_VER_2_3) { if(global_unsynch && version <= ID3_VER_2_3) {
size -= skip_unsynched(fd, totframelen); size -= skip_unsynched(fd, totframelen);
} else { } else {
if(data_length_ind)
totframelen = data_length_ind;
size -= totframelen; size -= totframelen;
if( lseek(fd, totframelen, SEEK_CUR) == -1 ) if( lseek(fd, totframelen, SEEK_CUR) == -1 )
return; return;