MAD Decoder: Fix MP3 decoding crash
There was a stupid bug in the previous commit I made, which caused local or seekable MP3 files to crash the player on decode. This fixes that, by checking that a packet has actually been decoded before touching the packet info structures. Dumb, dumb, dumb error on my part. Fixes #244 Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
ca3dec4497
commit
a978dfbf5a
|
@ -622,7 +622,8 @@
|
|||
- (int)readAudio:(void *)buffer frames:(UInt32)frames {
|
||||
int framesRead = 0;
|
||||
|
||||
[self syncFormat:YES];
|
||||
if(!_firstFrame)
|
||||
[self syncFormat:YES];
|
||||
|
||||
for(;;) {
|
||||
long framesRemaining = frames - framesRead;
|
||||
|
|
Loading…
Reference in New Issue