Merge pull request #5381 from raven02/patch-16

Avoid repeat spamming of audio end reach in the case of audio stream present
This commit is contained in:
Henrik Rydgård 2014-02-10 09:32:06 +01:00
commit 19fca25263

View File

@ -1165,18 +1165,18 @@ int sceMpegGetAtracAu(u32 mpeg, u32 streamId, u32 auAddr, u32 attrAddr)
}
int result = 0;
atracAu.pts = ctx->mediaengine->getAudioTimeStamp() + ctx->mpegFirstTimestamp;
if (ctx->mediaengine->IsVideoEnd()) {
INFO_LOG(ME, "video end reach. pts: %i dts: %i", (int)atracAu.pts, (int)ctx->mediaengine->getLastTimeStamp());
mpegRingbuffer.packetsFree = mpegRingbuffer.packets;
Memory::WriteStruct(ctx->mpegRingbufferAddr, &mpegRingbuffer);
result = ERROR_MPEG_NO_DATA;
}
if (ctx->mediaengine->IsNoAudioData()) {
INFO_LOG(ME, "Audio end reach. pts: %i dts: %i", (int)atracAu.pts, (int)ctx->mediaengine->getLastTimeStamp());
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;
result = ERROR_MPEG_NO_DATA;
}