diff options
author | Paul Gilbert | 2016-10-30 11:13:51 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-10-30 11:13:51 -0400 |
commit | f04174aa8a0c871dbb2a5523d747ec11d65c036c (patch) | |
tree | fcb20acf9dc078c0d13965097e2a223ee2391316 /engines | |
parent | 844972441e1d28bf64ee3ef3539fee562227036e (diff) | |
download | scummvm-rg350-f04174aa8a0c871dbb2a5523d747ec11d65c036c.tar.gz scummvm-rg350-f04174aa8a0c871dbb2a5523d747ec11d65c036c.tar.bz2 scummvm-rg350-f04174aa8a0c871dbb2a5523d747ec11d65c036c.zip |
TITANIC: Fix playing past very last frame of videos
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/support/avi_surface.cpp | 5 | ||||
-rw-r--r-- | engines/titanic/support/avi_surface.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index c3fe54522b..b4d72d43ca 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 e4599da03a..8d9b92df40 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(); } /** |