mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #19063 from hrydgard/atrac-change-databuf-check
atrac: Change the databuf check in sceAtracDecodeData
This commit is contained in:
commit
a866e07082
1 changed files with 4 additions and 4 deletions
|
@ -239,10 +239,10 @@ static u32 sceAtracAddStreamData(int atracID, u32 bytesToAdd) {
|
||||||
// Note that outAddr being null is completely valid here, used to skip data.
|
// Note that outAddr being null is completely valid here, used to skip data.
|
||||||
static u32 sceAtracDecodeData(int atracID, u32 outAddr, u32 numSamplesAddr, u32 finishFlagAddr, u32 remainAddr) {
|
static u32 sceAtracDecodeData(int atracID, u32 outAddr, u32 numSamplesAddr, u32 finishFlagAddr, u32 remainAddr) {
|
||||||
Atrac *atrac = getAtrac(atracID);
|
Atrac *atrac = getAtrac(atracID);
|
||||||
if (atrac == NULL) {
|
u32 err = AtracValidateData(atrac);
|
||||||
return ATRAC_ERROR_BAD_ATRACID;
|
if (err != 0) {
|
||||||
} else if (!atrac->dataBuf_) { // TODO: Should check bufferState instead?
|
// Already logged.
|
||||||
return ATRAC_ERROR_NO_DATA;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 numSamples = 0;
|
u32 numSamples = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue