From e51a9b6dd63cd4b3585d5aa28e3906de0717e47c Mon Sep 17 00:00:00 2001 From: raven02 Date: Sat, 21 Sep 2013 12:03:54 +0800 Subject: [PATCH] Fix missing intro CG in GTA series --- Core/HLE/sceMpeg.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index acb556c8b2..55d4043089 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -283,6 +283,16 @@ void AnalyzeMpeg(u8 *buffer, MpegContext *ctx) { return; } + if (ctx->mediaengine && (ctx->mpegStreamSize > 0) && !ctx->isAnalyzed) { + // init mediaEngine + SceMpegRingBuffer ringbuffer = {0}; + if(ctx->mpegRingbufferAddr != 0){ + Memory::ReadStruct(ctx->mpegRingbufferAddr, &ringbuffer); + }; + ctx->mediaengine->loadStream(buffer, ctx->mpegOffset, ringbuffer.packets * ringbuffer.packetSize); + ctx->mediaengine->setVideoDim(); + } + // When used with scePsmf, some applications attempt to use sceMpegQueryStreamOffset // and sceMpegQueryStreamSize, which forces a packet overwrite in the Media Engine and in // the MPEG ringbuffer.