diff options
-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(); } /** |