mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #1731 from oioitff/atrac-fix
Only add stream data when it need more atrac data.
This commit is contained in:
commit
6048f11f9f
1 changed files with 3 additions and 0 deletions
|
@ -429,6 +429,9 @@ u32 sceAtracAddStreamData(int atracID, u32 bytesToAdd)
|
|||
// TODO
|
||||
if (bytesToAdd > atrac->first.writableBytes)
|
||||
return ATRAC_ERROR_ADD_DATA_IS_TOO_BIG;
|
||||
// only add stream data when it need more atrac data
|
||||
if (atrac->getRemainFrames() > 0)
|
||||
return 0;
|
||||
|
||||
if (atrac->data_buf && (bytesToAdd > 0)) {
|
||||
int addbytes = std::min(bytesToAdd, atrac->first.filesize - atrac->first.fileoffset);
|
||||
|
|
Loading…
Add table
Reference in a new issue