Make duration functions work with negative values.
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ func (c *webClient) GetStats() *stats.Client {
|
||||
maxTid := layer.maxTid
|
||||
rate, _ := t.rate.Estimate()
|
||||
maxRate, _, _ := t.GetMaxBitrate()
|
||||
rtt := rtptime.ToDuration(t.getRTT(),
|
||||
rtt := rtptime.ToDuration(int64(t.getRTT()),
|
||||
rtptime.JiffiesPerSec)
|
||||
loss, jitter := t.stats.Get(jiffies)
|
||||
j := time.Duration(jitter) * time.Second /
|
||||
|
||||
@@ -138,7 +138,7 @@ func (wp *rtpWriterPool) write(seqno uint16, index uint16, delay uint32, isvideo
|
||||
// audio, try again with a delay
|
||||
d := delay / uint32(2*len(wp.writers))
|
||||
timer := time.NewTimer(rtptime.ToDuration(
|
||||
uint64(d), rtptime.JiffiesPerSec,
|
||||
int64(d), rtptime.JiffiesPerSec,
|
||||
))
|
||||
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user