Open painbaker opened 1 year ago
I experience the same problem!
Another one
DivisionByZeroError: Division by zero ...\vendor\wapmorgan\mp3info\src\Mp3Info.php:327
https://drive.google.com/open?id=13RITkPPiovgwDMefsBAPf7Zz8i4NohKW&usp=drive_fs
(File opened via url/http - not locally!)
PHP Fatal error: Uncaught DivisionByZeroError: Division by zero in Mp3Info-0.1.0/src/Mp3Info.php:425
What I've traced so far:
$this->codecVersion
is 2
.$header_bytes
are 255, 247, 31, 219
(or FF F7 1F DB
)($header_bytes[2] >> 2) & 0b11
turns into 3
self::$_sampleRateTable[3]
is false
("reserved" according to spec)$this->sampleRate
gets set to false
which causes the DivisionByZeroError laterEDIT: A workaround for me seems to be checking $this->sampleRate
right after line 388, and if it turns out to be false
, just do a return null
. Which will make Mp3Info read the next frame. This issue might be related to #13 - just that the first frame is giving invalid data here.
DivisionByZeroError: Division by zero in ..\vendor\wapmorgan\mp3info\src\Mp3Info.php at line 425
Sample file: https://drive.google.com/open?id=11IrcdfEWlSTGwwXgf-yro2Hgjk3CV15M&usp=drive_fs
0.1.0