Allow bigger delay setting in LAME header.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7730 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
057cc06c68
commit
a1df060a93
1 changed files with 3 additions and 1 deletions
|
@ -442,7 +442,9 @@ int get_mp3file_info(int fd, struct mp3info *info)
|
|||
i += 21;
|
||||
info->enc_delay = (vbrheader[i] << 4) | (vbrheader[i + 1] >> 4);
|
||||
info->enc_padding = ((vbrheader[i + 1] & 0x0f) << 8) | vbrheader[i + 2];
|
||||
if (!(info->enc_delay >= 0 && info->enc_delay <= 1152 &&
|
||||
/* TODO: This sanity checking is rather silly, seeing as how the LAME
|
||||
header contains a CRC field that can be used to verify integrity. */
|
||||
if (!(info->enc_delay >= 0 && info->enc_delay <= 2880 &&
|
||||
info->enc_padding >= 0 && info->enc_padding <= 2*1152))
|
||||
{
|
||||
/* Invalid data */
|
||||
|
|
Loading…
Reference in a new issue