]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Patch from hondansx to fix loss of timing bar when skipping
authorChris Tallon <chris@vomp.tv>
Tue, 20 Nov 2012 22:19:28 +0000 (22:19 +0000)
committerChris Tallon <chris@vomp.tv>
Tue, 20 Nov 2012 22:19:28 +0000 (22:19 +0000)
demuxerts.cc

index 9d0cf32d4f6cef8247547af4e9f3d74b2fa7c601..9d70a84c6955597ff101bd0dabf31221686133ac 100644 (file)
@@ -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