]> git.vomp.tv Git - vompclient.git/commitdiff
*** empty log message ***
authorChris Tallon <chris@vomp.tv>
Thu, 11 Mar 2010 14:13:17 +0000 (14:13 +0000)
committerChris Tallon <chris@vomp.tv>
Thu, 11 Mar 2010 14:13:17 +0000 (14:13 +0000)
demuxerts.cc
videowin.cc

index 5fac53ffc6a21272c746ecb521b88cf767cb1f87..25b4de468964d81f1a9201642709b14b855389ec 100644 (file)
@@ -615,6 +615,7 @@ ULONG DemuxerTS::getFrameNumFromPTS(ULLONG pts)
   ULLONG difference = (1LL<<33);
   ULONG ref_frame = 0;
   int total = 0, actual = 0;
+  if (pts==0) return 0; //we are in startup
   pts_map_mutex.Lock();
   PTSMap::iterator iter = pts_map.begin();
   while (iter != pts_map.end())
index 357f5a72bb4a8bd778ab37bf3623d0335204e98c..b62861c7d55124a6c34473faf010e4a926c1a885 100644 (file)
@@ -1553,12 +1553,14 @@ ULLONG VideoWin::getCurrentTimestamp()
        if (state==State_Running) dsrefclock->GetTime(&cr_time);
        ncr_time=cr_time;
   startoffset=sourcefilter->getStartOffset();
+  if (startoffset==0) return 0;
        ncr_time-=startoffset;
        ncr_time-=lastreftimeRT;
  /* ULLONG result=frameNumberToTimecode(
     VDR::getInstance()->frameNumberFromPosition(lastreftimeBYTE));*/
-       ULLONG result=lastreftimePTS;
+       long long result=lastreftimePTS;
        result+=(ULLONG)(ncr_time/10000LL*90LL);
+       if (result<0) result=(1LL << 33)-result;
   return result;
 
 }