diff options
author | Matthew Hoops | 2014-12-24 10:35:13 -0500 |
---|---|---|
committer | Matthew Hoops | 2014-12-24 10:38:28 -0500 |
commit | bed532587b4235a3cb9f2596bf7e65afdf33568a (patch) | |
tree | 463d5e6dcdecda68be8465e051013b6648bb10ac | |
parent | 702adaf9f807f19cd8849af737168461169734d3 (diff) | |
download | scummvm-rg350-bed532587b4235a3cb9f2596bf7e65afdf33568a.tar.gz scummvm-rg350-bed532587b4235a3cb9f2596bf7e65afdf33568a.tar.bz2 scummvm-rg350-bed532587b4235a3cb9f2596bf7e65afdf33568a.zip |
VIDEO: Fix check to see if the frame rate is a whole number
Thanks to Marisa-Chan for spotting
-rw-r--r-- | video/video_decoder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index dce96aae03..a4bc5b81a2 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -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 |