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,6 +622,7 @@
|
||||||
- (int)readAudio:(void *)buffer frames:(UInt32)frames {
|
- (int)readAudio:(void *)buffer frames:(UInt32)frames {
|
||||||
int framesRead = 0;
|
int framesRead = 0;
|
||||||
|
|
||||||
|
if(!_firstFrame)
|
||||||
[self syncFormat:YES];
|
[self syncFormat:YES];
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
|
|
Loading…
Reference in New Issue