[Scummvm-git-logs] scummvm master -> 1f1a4427f5d3bba62f73fa2bcbf2490aa813d062

dreammaster dreammaster at scummvm.org
Tue Sep 19 03:19:13 CEST 2017


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

Summary:
1f1a4427f5 TITANIC: Change AVISurface _framePixels from ManagedSurface to bool


Commit: 1f1a4427f5d3bba62f73fa2bcbf2490aa813d062
    https://github.com/scummvm/scummvm/commit/1f1a4427f5d3bba62f73fa2bcbf2490aa813d062
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-09-18T21:19:06-04:00

Commit Message:
TITANIC: Change AVISurface _framePixels from ManagedSurface to bool

Changed paths:
    engines/titanic/support/avi_surface.cpp
    engines/titanic/support/avi_surface.h


diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index cebc4ba..4b60921 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -44,7 +44,7 @@ AVISurface::AVISurface(const CResourceKey &key) : _movieName(key.getString()) {
 	_videoSurface = nullptr;
 	_streamCount = 0;
 	_movieFrameSurface[0] = _movieFrameSurface[1] = nullptr;
-	_framePixels = nullptr;
+	_framePixels = false;
 	_priorFrameTime = 0;
 
 	// Reset current frame. We need to keep track of frames separately from the decoder,
@@ -75,7 +75,6 @@ AVISurface::AVISurface(const CResourceKey &key) : _movieName(key.getString()) {
 AVISurface::~AVISurface() {
 	if (_videoSurface)
 		_videoSurface->_flipVertically = false;
-	delete _framePixels;
 	delete _movieFrameSurface[0];
 	delete _movieFrameSurface[1];
 	delete _decoder;
@@ -292,8 +291,7 @@ void AVISurface::setupDecompressor() {
 		}
 
 		if (!flag) {
-			_framePixels = new Graphics::ManagedSurface(_decoder->getWidth(), _decoder->getHeight(),
-				_decoder->getVideoTrack(0).getPixelFormat());
+			_framePixels = true;
 		} else if (idx == 0) {
 			// The original developers used a vertical flipped playback to indicate
 			// an incompatibility between source video and dest surface bit-depths,
diff --git a/engines/titanic/support/avi_surface.h b/engines/titanic/support/avi_surface.h
index 4e9166c..3ee8c38 100644
--- a/engines/titanic/support/avi_surface.h
+++ b/engines/titanic/support/avi_surface.h
@@ -104,7 +104,7 @@ private:
 	CMovieRangeInfoList _movieRangeInfo;
 	int _streamCount;
 	Graphics::ManagedSurface *_movieFrameSurface[2];
-	Graphics::ManagedSurface *_framePixels;
+	bool _framePixels;
 	double _frameRate;
 	int _currentFrame, _priorFrame;
 	uint32 _priorFrameTime;





More information about the Scummvm-git-logs mailing list