mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
Merge pull request #23030 from hrydgard/empty-frame-handling
sceVideocodec: Fail decoding an empty access unit, as the PSP does
This commit is contained in:
4 files changed
+10
-2
No files matched your search
@@ -759,6 +759,13 @@ static int sceVideocodecDecode(u32 ctxAddr, int type) {
|
||||
// is about to read. Nor is a picture announced until the buffers holding it have been
|
||||
// published: saying "one image decoded" and then failing to allocate would have mpeg.prx
|
||||
// convert from whatever the descriptor pointed at last.
|
||||
if (auSize <= 0) {
|
||||
// An empty access unit is an error, and the stream carries on normally after it
|
||||
// (pspautotests video/mpeg/decoderepeat). sceMpegAvcDecode passes one when called again
|
||||
// on a unit it already decoded, which some movie players do until a picture comes back.
|
||||
// The error is what ends their loop.
|
||||
return hleLogDebug(Log::ME, SCE_MPEG_ERROR_AVC_DECODE_FATAL, "type 0, no access unit");
|
||||
}
|
||||
int pictures = 0;
|
||||
if (au && auBytes > 0) {
|
||||
if (vctx.decoder->DecodePictures(au, auBytes) < 0) {
|
||||
|
||||
@@ -89,7 +89,7 @@ static inline void DelaySlotJumpTo(MIPSState *mips, u32 where) {
|
||||
if (!InJumpDelaySlot(mips)) {
|
||||
return;
|
||||
}
|
||||
if (!mips->space->IsValidAddress(where) || (where & 3) != 0) {
|
||||
if (!mips->space->IsValid4AlignedAddress(where)) {
|
||||
Core_ExecException(where, PC, ExecExceptionType::JUMP);
|
||||
}
|
||||
mips->nextPC = where;
|
||||
|
||||
+1
-1
Submodule pspautotests updated: fcd60cb905...ab2245ec6f.
@@ -795,6 +795,7 @@ tests_next = [
|
||||
"video/mp4/avchold", # needs Sony's mp4 and mpeg modules: --disable-hle=0x110, see docs/pspautotests.md
|
||||
"video/mpeg/basic",
|
||||
"video/mpeg/decodeend", # needs Sony's mpeg module, as avchold
|
||||
"video/mpeg/decoderepeat", # needs Sony's mpeg module, as avchold
|
||||
"video/mpeg/deletetiming",
|
||||
"video/pmf/pmf",
|
||||
"video/pmf_simple/pmf_simple",
|
||||
|
||||
Reference in new issue
Block a user