forked from len0rd/rockbox
The ID3 parser accidentally allowed a data length indicator flag on 2.3 tags, and the grouping identity bit is not the same on 2.3 and 2.4 (sigh).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4455 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e2ee28cd53
commit
2cc373eb99
1 changed files with 17 additions and 9 deletions
|
|
@ -16,7 +16,6 @@
|
||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parts of this code has been stolen from the Ample project and was written
|
* Parts of this code has been stolen from the Ample project and was written
|
||||||
* by David Härdeman. It has since been extended and enhanced pretty much by
|
* by David Härdeman. It has since been extended and enhanced pretty much by
|
||||||
|
|
@ -552,9 +551,16 @@ static void setid3v2title(int fd, struct mp3entry *entry)
|
||||||
{
|
{
|
||||||
skip = 0;
|
skip = 0;
|
||||||
|
|
||||||
if(flags & 0x0040) { /* Grouping identity */
|
if (version >= ID3_VER_2_4) {
|
||||||
lseek(fd, 1, SEEK_CUR); /* Skip 1 byte */
|
if(flags & 0x0040) { /* Grouping identity */
|
||||||
framelen--;
|
lseek(fd, 1, SEEK_CUR); /* Skip 1 byte */
|
||||||
|
framelen--;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(flags & 0x0020) { /* Grouping identity */
|
||||||
|
lseek(fd, 1, SEEK_CUR); /* Skip 1 byte */
|
||||||
|
framelen--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(flags & 0x000c) /* Compression or encryption */
|
if(flags & 0x000c) /* Compression or encryption */
|
||||||
|
|
@ -569,12 +575,14 @@ static void setid3v2title(int fd, struct mp3entry *entry)
|
||||||
if(flags & 0x0002) /* Unsynchronization */
|
if(flags & 0x0002) /* Unsynchronization */
|
||||||
unsynch = true;
|
unsynch = true;
|
||||||
|
|
||||||
if(flags & 0x0001) { /* Data length indicator */
|
if (version >= ID3_VER_2_4) {
|
||||||
if(4 != read(fd, tmp, 4))
|
if(flags & 0x0001) { /* Data length indicator */
|
||||||
return;
|
if(4 != read(fd, tmp, 4))
|
||||||
|
return;
|
||||||
|
|
||||||
data_length_ind = UNSYNC(tmp[0], tmp[1], tmp[2], tmp[3]);
|
data_length_ind = UNSYNC(tmp[0], tmp[1], tmp[2], tmp[3]);
|
||||||
framelen -= 4;
|
framelen -= 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue