Skip to content

Commit

Permalink
Mpeg:Only allow firmware >= 3 for warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
sum2012 committed Jan 29, 2021
1 parent 97e7a28 commit 6bc3cb4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Core/HLE/sceMpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "Core/Reporting.h"
#include "GPU/GPUInterface.h"
#include "GPU/GPUState.h"
#include "CORE/HLE/sceKernelMemory.h"

// MPEG AVC elementary stream.
static const int MPEG_AVC_ES_SIZE = 2048; // MPEG packet size.
Expand Down Expand Up @@ -1584,8 +1585,8 @@ static int sceMpegGetAvcAu(u32 mpeg, u32 streamId, u32 auAddr, u32 attrAddr)
ERROR_LOG_REPORT(ME, "sceMpegGetAvcAu(%08x, %08x, %08x, %08x): invalid ringbuffer address", mpeg, streamId, auAddr, attrAddr);
return -1;
}

if (ctx->mpegwarmUp < MPEG_WARMUP_FRAMES) {
int sdkver = sceKernelGetCompiledSdkVersion();
if ((sdkver >= 0x03000000) && (ctx->mpegwarmUp < MPEG_WARMUP_FRAMES)) {
DEBUG_LOG(ME, "sceMpegGetAvcAu(%08x, %08x, %08x, %08x): warming up", mpeg, streamId, auAddr, attrAddr);
ctx->mpegwarmUp++;
return ERROR_MPEG_NO_DATA;
Expand Down Expand Up @@ -1686,12 +1687,6 @@ static int sceMpegGetAtracAu(u32 mpeg, u32 streamId, u32 auAddr, u32 attrAddr)
return -1;
}

if (ctx->mpegwarmUp < MPEG_WARMUP_FRAMES) {
DEBUG_LOG(ME, "sceMpegGetAtracAu(%08x, %08x, %08x, %08x): warming up", mpeg, streamId, auAddr, attrAddr);
ctx->mpegwarmUp++;
return ERROR_MPEG_NO_DATA;
}

SceMpegAu atracAu;
atracAu.read(auAddr);

Expand Down

0 comments on commit 6bc3cb4

Please sign in to comment.