Comparing changes
Open a pull request
base repository: scummvm/scummvm
base: 702adaf9f807
head repository: scummvm/scummvm
compare: 59cd015fc90f
- 2 commits
- 2 files changed
- 4 commit comments
- 1 contributor
Thanks to Marisa-Chan for spotting
- +2 −0 engines/sci/graphics/screen.cpp
- +3 −1 video/video_decoder.cpp
| @@ -238,6 +238,8 @@ GfxScreen::GfxScreen(ResourceManager *resMan) : _resMan(resMan) { | ||
| _vectorPutPixelPtr = &GfxScreen::putPixelDisplayUpscaled; | ||
| _putPixelPtr = &GfxScreen::putPixelDisplayUpscaled; | ||
| break; | ||
| case GFX_SCREEN_UPSCALED_DISABLED: | ||
| break; | ||
| } | ||
| } | ||
|
|
||
| @@ -530,7 +530,9 @@ Audio::Timestamp VideoDecoder::FixedRateVideoTrack::getFrameTime(uint frame) con | ||
| // (which Audio::Timestamp doesn't support). | ||
| Common::Rational frameRate = getFrameRate(); | ||
|
|
||
| if (frameRate == frameRate.toInt()) // The nice case (a whole number) | ||
| // Try to keep it in terms of the frame rate, if the frame rate is a whole | ||
| // number. | ||
| if (frameRate.getDenominator() == 1) | ||
| return Audio::Timestamp(0, frame, frameRate.toInt()); | ||
|
|
||
| // Convert as best as possible | ||
Showing you all comments on commits in this comparison.
This comment has been minimized.
This comment has been minimized.
|
Yes, it's good fix, but this doesn't fix problem when you need to know framerate of video track when framerate not whole number, like 1000/66 = 15.151515152, like in ZVISION rlf decoder where rlf-files contain duration of frame - 66msec and getFrameRate will return 1000/66 or 500/33 after cancel(). Next part of code destruct real framerate:
May be timestamp needed separate fraction field for framerate or public interface for videodecoder |
This comment has been minimized.
This comment has been minimized.
|
Yes, the frame rate is purposely hidden from the outside. You should be using the |
This comment has been minimized.
This comment has been minimized.
|
If I needed to use only seek and decodeNext without start video - something like array of frames |
This comment has been minimized.
This comment has been minimized.
|
What's the problem with using the VideoDecoder's timing? It looks like ZVision just calls an "update" function with the amount of time that has passed. Just calling |