Mp3Info::Parse assumes MPEG header is at beginning of file
Brought to you by:
t1mpy
The Mp3Info::Parse incorrectly assumes that the 4-byte
MPEG header is at the beginning of the file. That's not
true for all MP3 files, especially ones created by
grip on Linux. Making the following change seems to fix
that (on Linux at least)
mp3_parse.cpp: 233
//
// MPEG headers don't always occur at the beginning
of the file
//
while ((((buf[0] & 0xFF) != 0xFF) || ((buf[1] & 0xE0)
!= 0xE0)) && !reader.atEnd()) //first 11 bits should be 1
{
reader.readChars(buf, HEADERSIZE);
}
if ( reader.atEnd() )
return false;
Now I can correctly read the duration of the MP3
Peter Antypas
peter at joyfaktory dot com
Logged In: NO
It solve some cases,
On one album that was strangely encoded I have 10 tracks,
6 of them where causing problems. now only 3 after patching :-)