[Scummvm-git-logs] scummvm master -> 7b4cf177c9e806d197e6e0dbb93a37a8391b000f

sev- noreply at scummvm.org
Thu Nov 6 23:04:17 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
7b4cf177c9 VIDEO: Exit gracefully from PSX video deocoder when data is corrupted


Commit: 7b4cf177c9e806d197e6e0dbb93a37a8391b000f
    https://github.com/scummvm/scummvm/commit/7b4cf177c9e806d197e6e0dbb93a37a8391b000f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-11-07T00:02:39+01:00

Commit Message:
VIDEO: Exit gracefully from PSX video deocoder when data is corrupted

Fixes Bug #14803 "SWORD2: Error during intro cutscene (Spanish Playstation version)"
and follows suggestion of davidmorom in the bugreport

Changed paths:
    video/psx_decoder.cpp


diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp
index 5eb7f741da2..7b1c21d3665 100644
--- a/video/psx_decoder.cpp
+++ b/video/psx_decoder.cpp
@@ -201,8 +201,10 @@ void PSXStreamDecoder::readNextPacket() {
 
 		sector->seek(0x11);
 		byte track = sector->readByte();
-		if (track >= 32)
-			error("Bad PSX stream track");
+		if (track >= 32) {
+			warning("Bad PSX stream track");
+			return;
+		}
 
 		byte sectorType = sector->readByte() & CDXA_TYPE_MASK;
 
@@ -406,8 +408,10 @@ void PSXStreamDecoder::PSXVideoTrack::decodeFrame(Common::BitStreamMemoryStream
 	uint16 scale = bits.getBits<16>();
 	uint16 version = bits.getBits<16>();
 
-	if (version != 2 && version != 3)
-		error("Unknown PSX stream frame version");
+	if (version != 2 && version != 3) {
+		warning("Unknown PSX stream frame version");
+		return;
+	}
 
 	// Initalize default v3 DC here
 	_lastDC[0] = _lastDC[1] = _lastDC[2] = 0;




More information about the Scummvm-git-logs mailing list