Skip to content

Commit

Permalink
Mpeg: Return errors when no audio is available.
Browse files Browse the repository at this point in the history
Before, we were only returning an error once, in an effort to log only
once.  This meant sometimes games would not realize they needed to add
packets.
  • Loading branch information
unknownbrackets committed Jan 17, 2016
1 parent 067095e commit c03f6c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Core/HLE/sceMpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1602,12 +1602,18 @@ static int sceMpegGetAtracAu(u32 mpeg, u32 streamId, u32 auAddr, u32 attrAddr)
if (ctx->mediaengine->IsVideoEnd()) {
INFO_LOG(ME, "video end reach. pts: %i dts: %i", (int)atracAu.pts, (int)ctx->mediaengine->getLastTimeStamp());
ringbuffer->packetsAvail = 0;
// TODO: Is this correct?
if (!ctx->mediaengine->IsNoAudioData()) {
WARN_LOG_REPORT(ME, "Video end without audio end, potentially skipping some audio?");
}
result = ERROR_MPEG_NO_DATA;
}

if (ctx->atracRegistered && ctx->mediaengine->IsNoAudioData() && !ctx->endOfAudioReached) {
WARN_LOG(ME, "Audio end reach. pts: %i dts: %i", (int)atracAu.pts, (int)ctx->mediaengine->getLastTimeStamp());
ctx->endOfAudioReached = true;
}
if (ctx->mediaengine->IsNoAudioData()) {
result = ERROR_MPEG_NO_DATA;
}

Expand Down

0 comments on commit c03f6c2

Please sign in to comment.