Skip to content

Commit

Permalink
feat: reduce to maxLatency
Browse files Browse the repository at this point in the history
  • Loading branch information
kjs001127 authored and kjs001127 committed May 2, 2023
1 parent 5dc440b commit e8e2052
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/jitter/jitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (b *Jitter) Put(p *Packet) {

b.listener.OnPacketEnqueue(b.current, b.sumRemainingTs(), p)

if !b.marked || math.Abs(float64(p.Timestamp-b.targetTime())) > float64(b.defaultTickInterval)*reSyncThreshold {
if !b.marked || math.Abs(float64(p.Timestamp-b.targetTime())) > float64(b.maxLatency) {
b.init(p.Timestamp)
}

Expand Down

0 comments on commit e8e2052

Please sign in to comment.