Skip to content

Commit 0671991

Browse files
mengelbartJoeTurki
andauthored
Remove floats from delta calculation
Co-authored-by: Joe Turki <[email protected]>
1 parent ceaeb98 commit 0671991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/rtpfb/ccfb_receiver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func convertMetricBlock(
4444
// the RTS field, then an ATO value of 0x1FFF MUST be reported for
4545
// the packet. In that case, we set a zero time.Time value.
4646
if mb.ArrivalTimeOffset != 0x1FFF {
47-
delta := time.Duration((float64(mb.ArrivalTimeOffset) / 1024.0) * float64(time.Second))
47+
delta := time.Duration(mb.ArrivalTimeOffset) * time.Second / 1024
4848
arrival = reference.Add(-delta)
4949
if arrival.After(latestArrival) {
5050
latestArrival = arrival

0 commit comments

Comments
 (0)