mirror of
https://github.com/lkmio/lkm.git
synced 2025-09-26 19:21:14 +08:00
fix: 错误计算rtcp时间戳, 造成vlc拉流卡顿问题
This commit is contained in:
@@ -100,8 +100,10 @@ func (s *Sink) Write(index int, data []*collections.ReferenceCounter[[]byte], rt
|
||||
continue
|
||||
}
|
||||
|
||||
nano := uint64(time.Now().UnixNano())
|
||||
ntp := (nano/1000000000 + 2208988800<<32) | (nano % 1000000000)
|
||||
nano := time.Now().UnixNano()
|
||||
seconds := uint64(nano/1e9 + 2208988800)
|
||||
fraction := uint64((nano % 1e9) * (1 << 32) / 1e9)
|
||||
ntp := (seconds << 32) | fraction
|
||||
sr := rtcp.SenderReport{
|
||||
SSRC: sender.SSRC,
|
||||
NTPTime: ntp,
|
||||
|
Reference in New Issue
Block a user