[Live-devel] A bug of h264 rtp packet's timestamp

Tony fantasyvideo at 126.com
Thu Dec 19 02:35:28 PST 2013


HI, Ross
Here the code of compute next fPresentationTime.
  // Note that the presentation time for the next NAL unit will be different:  
            struct timeval& nextPT = usingSource()->fNextPresentationTime; // alias  
            nextPT = usingSource()->fPresentationTime;  
            double nextFraction = nextPT.tv_usec / 1000000.0  
                    + 1 / usingSource()->fFrameRate;  
            unsigned nextSecsIncrement = (long) nextFraction;  
            nextPT.tv_sec += (long) nextSecsIncrement;  
            nextPT.tv_usec = (long) ((nextFraction - nextSecsIncrement)  
                    * 1000000);  
   As you know, if live555 can't get framerate from sps, then the framerate would be 25fps.
   But if the framerate is variable or not 25, it would be wrong. The timestamp increment shouldn't be 3600.
   So could you check it ? THANKS.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20131219/f6bc0b00/attachment.html>


More information about the live-devel mailing list