Change the databuf check in sceAtracDecodeData

Making a separate commit for bisection's sake.
This commit is contained in:
Henrik Rydgård 2024-04-15 12:18:40 +02:00
parent c9d397ece9
commit 4680d87fcd

View file

@ -239,10 +239,10 @@ static u32 sceAtracAddStreamData(int atracID, u32 bytesToAdd) {
// 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) {
Atrac *atrac = getAtrac(atracID);
if (atrac == NULL) {
return ATRAC_ERROR_BAD_ATRACID;
} else if (!atrac->dataBuf_) { // TODO: Should check bufferState instead?
return ATRAC_ERROR_NO_DATA;
u32 err = AtracValidateData(atrac);
if (err != 0) {
// Already logged.
return err;
}
u32 numSamples = 0;