diff options
-rw-r--r-- | engines/voyeur/animation.cpp | 4 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp index 5318da26e9..8206707bc5 100644 --- a/engines/voyeur/animation.cpp +++ b/engines/voyeur/animation.cpp @@ -268,8 +268,8 @@ bool RL2Decoder::RL2VideoTrack::endOfTrack() const { } bool RL2Decoder::RL2VideoTrack::seek(const Audio::Timestamp &time) { - int frame = time.totalNumberOfFrames(); - + int frame = getFrameAtTime(time); + if (frame < 0 || frame >= _header._numFrames) return false; diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index 37dd527b39..1142599f12 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -565,8 +565,7 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) { RL2Decoder decoder; decoder.loadVideo(videoId); - decoder.seek(Audio::Timestamp(_voy._vocSecondsOffset * 1000, - decoder.getHeader().getFrameRate().toInt())); + decoder.seek(Audio::Timestamp(_voy._vocSecondsOffset * 1000)); decoder.start(); int endFrame = decoder.getCurFrame() + totalFrames; |