forked from len0rd/rockbox
Better handling of large frames in V2 tags
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2771 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
18225f6a98
commit
fd3d50a4db
1 changed files with 9 additions and 3 deletions
|
|
@ -223,7 +223,7 @@ static bool setid3v1title(int fd, struct mp3entry *entry)
|
||||||
/*
|
/*
|
||||||
* Sets the title of an MP3 entry based on its ID3v2 tag.
|
* Sets the title of an MP3 entry based on its ID3v2 tag.
|
||||||
*
|
*
|
||||||
* Arguments: file - the MP3 file to scen for a ID3v2 tag
|
* Arguments: file - the MP3 file to scan for a ID3v2 tag
|
||||||
* entry - the entry to set the title in
|
* entry - the entry to set the title in
|
||||||
*
|
*
|
||||||
* Returns: true if a title was found and created, else false
|
* Returns: true if a title was found and created, else false
|
||||||
|
|
@ -291,7 +291,7 @@ static void setid3v2title(int fd, struct mp3entry *entry)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Keep track of the total size */
|
/* Keep track of the total size */
|
||||||
totframelen += framelen;
|
totframelen = framelen;
|
||||||
|
|
||||||
if(framelen == 0)
|
if(framelen == 0)
|
||||||
return;
|
return;
|
||||||
|
|
@ -337,6 +337,12 @@ static void setid3v2title(int fd, struct mp3entry *entry)
|
||||||
bufferpos += bytesread + 1;
|
bufferpos += bytesread + 1;
|
||||||
size -= bytesread;
|
size -= bytesread;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/* Unknown frame, skip it using the total size in case
|
||||||
|
it was truncated */
|
||||||
|
size -= totframelen;
|
||||||
|
lseek(fd, totframelen, SEEK_CUR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue