Mpeg:Only allow firmware >= 3 for warmup

Fix #13996
This commit is contained in:
sum2012 committed 2021-01-29 22:26:45 +08:00
1 parent 97e7a28161
commit 6bc3cb4dfa
1 file changed
+3 -8
+3 -8
View File
@@ -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.
@@ -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;
@@ -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);