Bug fix for scepsmf.
This commit is contained in:
parent
f2af925015
commit
00e6873a30
1 changed files with 4 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue