From 41a08842a4f9feb112ddfea723bd0a528a5ba29d Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Tue, 20 Nov 2012 22:19:28 +0000 Subject: [PATCH] Patch from hondansx to fix loss of timing bar when skipping --- demuxerts.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demuxerts.cc b/demuxerts.cc index 9d0cf32..9d70a84 100644 --- a/demuxerts.cc +++ b/demuxerts.cc @@ -705,7 +705,9 @@ void DemuxerTS::parseTSPacketDetails(PESPacket &packet) // Only important stuff //UINT fps = Video::getInstance()->getFPS(); double tfps=fps; if (doubledframerate) tfps*=2.; - ULLONG pts_expected = me.pts + 90000*((int)(((double)(frame_num - me.frame)) / tfps)); + long long pts_expected = me.pts + 90000LL*((long long)(((double)(frame_num - me.frame)) / tfps)); + + while (pts_expected < 0) pts_expected += (1LL<<33); while (pts_expected > (1LL<<33)) pts_expected -= (1LL<<33); if (!doubledframerate -- 2.39.5