diff options
author | Paul Gilbert | 2017-06-30 22:59:29 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-06-30 22:59:29 -0400 |
commit | 28c461e2f93819ab3a524023d5453ad5f32943e9 (patch) | |
tree | 8b0b07ff24476b6bbf44c8750e0eac1575dc192a /engines/titanic/support | |
parent | e4ba3fccc3b3c231849e1304dd8ab2c9a37d8ee6 (diff) | |
download | scummvm-rg350-28c461e2f93819ab3a524023d5453ad5f32943e9.tar.gz scummvm-rg350-28c461e2f93819ab3a524023d5453ad5f32943e9.tar.bz2 scummvm-rg350-28c461e2f93819ab3a524023d5453ad5f32943e9.zip |
TITANIC: Don't set movie framerate until after movie has started
Diffstat (limited to 'engines/titanic/support')
-rw-r--r-- | engines/titanic/support/avi_surface.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp index 0308465bc6..97cc68fc1a 100644 --- a/engines/titanic/support/avi_surface.cpp +++ b/engines/titanic/support/avi_surface.cpp @@ -147,8 +147,10 @@ bool AVISurface::startAtFrame(int frameNumber) { seekToFrame(frameNumber); // If we're in reverse playback, set the decoder to play in reverse - if (_isReversed) + if (_isReversed) { + _decoder->setReverse(true); _decoder->setRate(Common::Rational(-1)); + } renderFrame(); @@ -436,6 +438,10 @@ bool AVISurface::addEvent(int *frameNumber, CGameObject *obj) { } void AVISurface::setFrameRate(double rate) { + // Assert that the decoder is already playing, since otherwise setting + // the decoder rate would prematurely start playback + assert(_decoder->isPlaying()); + // Convert rate from fps to relative to 1.0 (normal speed) const int PRECISION = 10000; double playRate = rate / 15.0; // Standard 15 FPS |