VIDEO: Set decoder frame rate when loading Theora video.

This commit is contained in:
Matthew Duggan 2022-09-19 09:56:25 +09:00 committed by Filippos Karapetis
parent d795904268
commit b2a9df06e2
2 changed files with 2 additions and 0 deletions

View File

@ -169,6 +169,7 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) {
if (_hasVideo) {
_videoTrack = new TheoraVideoTrack(getDefaultHighColorFormat(), theoraInfo, theoraSetup);
addTrack(_videoTrack);
setRate(_videoTrack->getFrameRate());
}
th_info_clear(&theoraInfo);

View File

@ -84,6 +84,7 @@ private:
uint16 getHeight() const { return _displaySurface.h; }
Graphics::PixelFormat getPixelFormat() const { return _displaySurface.format; }
int getCurFrame() const { return _curFrame; }
const Common::Rational &getFrameRate() const { return _frameRate; }
uint32 getNextFrameStartTime() const { return (uint32)(_nextFrameStartTime * 1000); }
const Graphics::Surface *decodeNextFrame() { return &_displaySurface; }