aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/zvision/video.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/zvision/video.cpp b/engines/zvision/video.cpp
index 2a320cb790..0836eef496 100644
--- a/engines/zvision/video.cpp
+++ b/engines/zvision/video.cpp
@@ -106,7 +106,10 @@ void ZVision::playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &d
uint16 finalWidth = origWidth * scale;
uint16 finalHeight = origHeight * scale;
- byte *scaledVideoFrameBuffer = new byte[finalWidth * finalHeight * bytesPerPixel];
+ byte *scaledVideoFrameBuffer;
+ if (scale != 1) {
+ scaledVideoFrameBuffer = new byte[finalWidth * finalHeight * bytesPerPixel];
+ }
uint16 x = ((_width - finalWidth) / 2) + destRect.left;
uint16 y = ((_height - finalHeight) / 2) + destRect.top;
@@ -158,7 +161,9 @@ void ZVision::playVideo(Video::VideoDecoder &videoDecoder, const Common::Rect &d
_clock.start();
- delete[] scaledVideoFrameBuffer;
+ if (scale != 1) {
+ delete[] scaledVideoFrameBuffer;
+ }
// Reset the pixel format to the original state
initGraphics(_width, _height, true, &_pixelFormat);