mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 00:59:41 +01:00
Merge pull request #1103 from raven02/patch-5
Improve sceMpegAvcDecode/YCbCr
This commit is contained in:
commit
3301fd5119
1 file changed
+4
-4
@@ -738,8 +738,8 @@ u32 sceMpegAvcDecode(u32 mpeg, u32 auAddr, u32 frameWidth, u32 bufferAddr, u32 i
|
||||
if (ringbuffer.packetsFree + packetsConsumed >= ringbuffer.packets) {
|
||||
// Having not yet reached the last timestamp?
|
||||
if (ctx->mpegLastTimestamp > 0 && avcAu.pts < ctx->mpegLastTimestamp) {
|
||||
// Do not yet consume all the remaining packets.
|
||||
packetsConsumed = 0;
|
||||
// Do not yet consume all the remaining packets, leave 2 packets
|
||||
packetsConsumed = ringbuffer.packets - ringbuffer.packetsFree - 2;
|
||||
}
|
||||
}
|
||||
ctx->mediaengine->setReadLength(ctx->mediaengine->readLength() - packetsConsumed * ringbuffer.packetSize);
|
||||
@@ -911,8 +911,8 @@ int sceMpegAvcDecodeYCbCr(u32 mpeg, u32 auAddr, u32 bufferAddr, u32 initAddr)
|
||||
if (ringbuffer.packetsFree + packetsConsumed >= ringbuffer.packets) {
|
||||
// Having not yet reached the last timestamp?
|
||||
if (ctx->mpegLastTimestamp > 0 && avcAu.pts < ctx->mpegLastTimestamp) {
|
||||
// Do not yet consume all the remaining packets.
|
||||
packetsConsumed = 0;
|
||||
// Do not yet consume all the remaining packets, leave 2 packets
|
||||
packetsConsumed = ringbuffer.packets - ringbuffer.packetsFree - 2;
|
||||
}
|
||||
}
|
||||
ctx->mediaengine->setReadLength(ctx->mediaengine->readLength() - packetsConsumed * ringbuffer.packetSize);
|
||||
|
||||
Reference in new issue
Block a user