diff options
-rw-r--r-- | graphics/video/coktel_decoder.cpp | 7 | ||||
-rw-r--r-- | graphics/video/coktel_decoder.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/graphics/video/coktel_decoder.cpp b/graphics/video/coktel_decoder.cpp index c8a934d5bb..73bcc6a8d0 100644 --- a/graphics/video/coktel_decoder.cpp +++ b/graphics/video/coktel_decoder.cpp @@ -439,6 +439,13 @@ Common::Rational CoktelDecoder::getFrameRate() const { return _frameRate; } +uint32 CoktelDecoder::getTimeToNextFrame() const { + if (hasSound()) + return FixedRateVideoDecoder::getTimeToNextFrame(); + + return (Common::Rational(1000) / _frameRate).toInt(); +} + inline void CoktelDecoder::unsignedToSigned(byte *buffer, int length) { while (length-- > 0) *buffer++ ^= 0x80; } diff --git a/graphics/video/coktel_decoder.h b/graphics/video/coktel_decoder.h index 0464b8e31b..9921fbd28c 100644 --- a/graphics/video/coktel_decoder.h +++ b/graphics/video/coktel_decoder.h @@ -174,6 +174,8 @@ protected: public: // FixedRateVideoDecoder interface Common::Rational getFrameRate() const; + + uint32 getTimeToNextFrame() const; }; class PreIMDDecoder : public CoktelDecoder { |