diff --git a/Core/HLE/scePsmf.cpp b/Core/HLE/scePsmf.cpp index 21c85a2e7..c7c1ab744 100644 --- a/Core/HLE/scePsmf.cpp +++ b/Core/HLE/scePsmf.cpp @@ -246,13 +246,11 @@ Psmf::Psmf(u32 data) { u32 currentStreamAddr = data + 0x82 + i * 16; int streamId = Memory::Read_U8(currentStreamAddr); if ((streamId & PSMF_VIDEO_STREAM_ID) == PSMF_VIDEO_STREAM_ID) { - stream = new PsmfStream(PSMF_AVC_STREAM, currentVideoStreamNum); + stream = new PsmfStream(PSMF_AVC_STREAM, ++currentVideoStreamNum); stream->readMPEGVideoStreamParams(currentStreamAddr, this); - currentVideoStreamNum++; } else if ((streamId & PSMF_AUDIO_STREAM_ID) == PSMF_AUDIO_STREAM_ID) { - stream = new PsmfStream(PSMF_ATRAC_STREAM, currentAudioStreamNum); + stream = new PsmfStream(PSMF_ATRAC_STREAM, ++currentAudioStreamNum); stream->readPrivateAudioStreamParams(currentStreamAddr, this); - currentAudioStreamNum++; } if (stream) { currentStreamNum++; @@ -452,8 +450,9 @@ u32 scePsmfGetNumberOfSpecificStreams(u32 psmfStruct, u32 streamType) } WARN_LOG(HLE, "scePsmfGetNumberOfSpecificStreams(%08x, %08x)", psmfStruct, streamType); int streamNum = 0; + int type = (streamType == PSMF_AUDIO_STREAM ? PSMF_ATRAC_STREAM : streamType); for (int i = psmf->streamMap.size() - 1; i >= 0; i--) { - if (psmf->streamMap[i]->type == streamType) + if (psmf->streamMap[i]->type == type) streamNum++; } return streamNum;