mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix Integer divide in zero in sceMp3Decode
This commit is contained in:
parent
f94c3d451f
commit
292e9baa08
1 changed files with 3 additions and 0 deletions
|
@ -243,6 +243,9 @@ int sceMp3Decode(u32 mp3, u32 outPcmPtr) {
|
|||
}
|
||||
#endif
|
||||
// 2 bytes per channel and we have frame.channels in mp3 source
|
||||
// learn japanese v0.9 frame.channels = 0
|
||||
if (frame.channels == 0)
|
||||
frame.channels = 2;
|
||||
ctx->mp3SumDecodedSamples += bytesdecoded / (2 * frame.channels);
|
||||
|
||||
return bytesdecoded;
|
||||
|
|
Loading…
Add table
Reference in a new issue