mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Fix a bad iterator dereference in sceMpeg.
Though not sure it should actually reach here, let's at least not crash.
This commit is contained in:
parent
1fd2316e32
commit
baf465500a
1 changed files with 4 additions and 1 deletions
|
@ -1569,6 +1569,7 @@ int sceMpegGetAtracAu(u32 mpeg, u32 streamId, u32 auAddr, u32 attrAddr)
|
|||
}
|
||||
if (streamInfo == ctx->streamMap.end()) {
|
||||
WARN_LOG_REPORT(ME, "sceMpegGetAtracAu: invalid audio stream %08x", streamId);
|
||||
// TODO: Why was this changed to not return an error?
|
||||
}
|
||||
|
||||
// The audio can end earlier than the video does.
|
||||
|
@ -1580,7 +1581,9 @@ int sceMpegGetAtracAu(u32 mpeg, u32 streamId, u32 auAddr, u32 attrAddr)
|
|||
|
||||
// esBuffer is the memory where this au data goes. We don't write the data to memory.
|
||||
// Instead, let's abuse it to keep track of the stream number.
|
||||
atracAu.esBuffer = streamInfo->second.num;
|
||||
if (streamInfo != ctx->streamMap.end()) {
|
||||
atracAu.esBuffer = streamInfo->second.num;
|
||||
}
|
||||
|
||||
int result = 0;
|
||||
atracAu.pts = ctx->mediaengine->getAudioTimeStamp() + ctx->mpegFirstTimestamp;
|
||||
|
|
Loading…
Add table
Reference in a new issue