[Scummvm-git-logs] scummvm master -> f27bf85bf761b895723a12e35d98db9a63b6594d

sev- sev at scummvm.org
Thu Feb 11 23:55:49 UTC 2021


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

Summary:
25eb92c074 AGS: Do not crash when video is not decoded properly
b1f889f03d VIDEO: Skip another chunk in AVI videos
f27bf85bf7 COMMON: Fix for modern GCC


Commit: 25eb92c0742d423b58c6fd6c42802cc2757ccc02
    https://github.com/scummvm/scummvm/commit/25eb92c0742d423b58c6fd6c42802cc2757ccc02
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-02-12T00:41:35+01:00

Commit Message:
AGS: Do not crash when video is not decoded properly

Changed paths:
    engines/ags/engine/media/video/video.cpp


diff --git a/engines/ags/engine/media/video/video.cpp b/engines/ags/engine/media/video/video.cpp
index 8bd12f5dcf..40fb4f8cf1 100644
--- a/engines/ags/engine/media/video/video.cpp
+++ b/engines/ags/engine/media/video/video.cpp
@@ -89,16 +89,19 @@ static bool play_video(Video::VideoDecoder *decoder, const char *name, int skip,
 			// Get the next video frame and draw onto the screen
 			const Graphics::Surface *frame = decoder->decodeNextFrame();
 
-			if (stretchVideo && frame->w == scr.w && frame->h == scr.h)
-				// Don't need to stretch video after all
-				stretchVideo = false;
-
-			if (stretchVideo) {
-				scr.transBlitFrom(*frame, Common::Rect(0, 0, frame->w, frame->h),
-					Common::Rect(0, 0, scr.w, scr.h));
-			} else {
-				scr.blitFrom(*frame, Common::Point((scr.w - frame->w) / 2,
-					(scr.h - frame->h) / 2));
+			if (frame) {
+
+				if (stretchVideo && frame->w == scr.w && frame->h == scr.h)
+					// Don't need to stretch video after all
+					stretchVideo = false;
+
+				if (stretchVideo) {
+					scr.transBlitFrom(*frame, Common::Rect(0, 0, frame->w, frame->h),
+						Common::Rect(0, 0, scr.w, scr.h));
+				} else {
+					scr.blitFrom(*frame, Common::Point((scr.w - frame->w) / 2,
+						(scr.h - frame->h) / 2));
+				}
 			}
 
 			scr.update();


Commit: b1f889f03d39ba469adb0d6b002925153d355e76
    https://github.com/scummvm/scummvm/commit/b1f889f03d39ba469adb0d6b002925153d355e76
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-02-12T00:41:36+01:00

Commit Message:
VIDEO: Skip another chunk in AVI videos

Changed paths:
    video/avi_decoder.cpp


diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 794a2ba942..309f0bc122 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -69,6 +69,7 @@ namespace Video {
 #define ID_DISP MKTAG('D','I','S','P')
 #define ID_PRMI MKTAG('P','R','M','I')
 #define ID_STRN MKTAG('s','t','r','n')
+#define ID_INDX MKTAG('i','n','d','x')
 
 // Stream Types
 enum {
@@ -210,6 +211,7 @@ bool AVIDecoder::parseNextChunk() {
 	case ID_ISFT: // Metadata, safe to ignore
 	case ID_DISP: // Metadata, should be safe to ignore
 	case ID_DMLH: // OpenDML extension, contains an extra total frames field, safe to ignore
+	case ID_INDX: // OpenDML extension, contains another type of index
 		skipChunk(size);
 		break;
 	case ID_STRN: // Metadata, safe to ignore


Commit: f27bf85bf761b895723a12e35d98db9a63b6594d
    https://github.com/scummvm/scummvm/commit/f27bf85bf761b895723a12e35d98db9a63b6594d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-02-12T00:55:16+01:00

Commit Message:
COMMON: Fix for modern GCC

Changed paths:
    common/scummsys.h


diff --git a/common/scummsys.h b/common/scummsys.h
index b09ff1f99b..872d6d062f 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -373,13 +373,15 @@
 #ifndef NORETURN_PRE
 	#if defined(_MSC_VER)
 		#define NORETURN_PRE __declspec(noreturn)
+	#elif defined(__GNUC__)
+		#define NORETURN_PRE __attribute__((__noreturn__))
 	#else
 		#define NORETURN_PRE
 	#endif
 #endif
 
 #ifndef NORETURN_POST
-	#if defined(__GNUC__) || defined(__INTEL_COMPILER)
+	#if defined(__INTEL_COMPILER)
 		#define NORETURN_POST __attribute__((__noreturn__))
 	#else
 		#define NORETURN_POST




More information about the Scummvm-git-logs mailing list