mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 15:35:41 +00:00
* Fix forced rollover of RTP time stamp. Was erroneously forcing a rollover when the timestamp jump actually has room to accommodate large jumps. For example, before pause ts = 10, then eight hour pause, restart ts = 10 + (8 * 00 * 60 * 90000) = 2592000010 (at 90000 clock rate for video). In normal processing, it will look like out-of-order as the difference 2592000000 is more than half the 32-bit range. But, forcing a roll over is incorrect. Fix by calculating excess over the full range and then account for wrap around. * log potential ts rollover * clamp at min 0