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

dreammaster dreammaster at scummvm.org
Sun Oct 30 16:13:59 CET 2016


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:
f04174aa8a TITANIC: Fix playing past very last frame of videos


Commit: f04174aa8a0c871dbb2a5523d747ec11d65c036c
    https://github.com/scummvm/scummvm/commit/f04174aa8a0c871dbb2a5523d747ec11d65c036c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-10-30T11:13:51-04:00

Commit Message:
TITANIC: Fix playing past very last frame of videos

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 c3fe545..b4d72d4 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -376,10 +376,11 @@ void AVISurface::playCutscene(const Rect &r, uint startFrame, uint endFrame) {
 		_movieFrameSurface[0]->h != r.height();
 
 	startAtFrame(startFrame);
-	while (!_decoder->endOfVideo() && _currentFrame < (int)endFrame && !g_vm->shouldQuit()) {
+	while (_currentFrame < (int)endFrame && !g_vm->shouldQuit()) {
 		if (isNextFrame()) {
 			renderFrame();
-			_currentFrame = _decoder->getCurFrame();
+			_currentFrame = _decoder->endOfVideo() ? _decoder->getFrameCount() :
+				_decoder->getCurFrame();
 
 			if (isDifferent) {
 				// Clear the destination area, and use the transBlitFrom method,
diff --git a/engines/titanic/support/avi_surface.h b/engines/titanic/support/avi_surface.h
index e4599da..8d9b92d 100644
--- a/engines/titanic/support/avi_surface.h
+++ b/engines/titanic/support/avi_surface.h
@@ -133,7 +133,7 @@ public:
 	 * Return true if a video is currently playing
 	 */
 	virtual bool isPlaying() const {
-		return _decoder->isPlaying() && !_decoder->endOfVideo();
+		return _decoder->isPlaying();
 	}
 
 	/**





More information about the Scummvm-git-logs mailing list