aboutsummaryrefslogtreecommitdiff
path: root/video/mpegps_decoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'video/mpegps_decoder.cpp')
-rw-r--r--video/mpegps_decoder.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/mpegps_decoder.cpp b/video/mpegps_decoder.cpp
index 421ae1ee3e..99624dd119 100644
--- a/video/mpegps_decoder.cpp
+++ b/video/mpegps_decoder.cpp
@@ -486,6 +486,10 @@ bool MPEGPSDecoder::MPEGVideoTrack::sendPacket(Common::SeekableReadStream *packe
if (foundFrame) {
_curFrame++;
+ if (pts != 0xFFFFFFFF) {
+ Audio::Timestamp ptsTimestamp = Audio::Timestamp(pts / 90, 27000000);
+ framePeriod = ptsTimestamp.frameDiff(_nextFrameStartTime);
+ }
_nextFrameStartTime = _nextFrameStartTime.addFrames(framePeriod);
}
#endif