Remove redundant check. (#2605)
* Remove redundant check. That check is already at the ouside check. * print string * space
This commit is contained in:
@@ -414,23 +414,23 @@ func (r *RTPStatsReceiver) SetRtcpSenderReportData(srData *RTCPSenderReportData)
|
|||||||
} else {
|
} else {
|
||||||
resetDelta()
|
resetDelta()
|
||||||
|
|
||||||
if deltaPropagationDelay.Abs() > cPropagationDelayDeltaThresholdMin {
|
factor := cPropagationDelayFallFactor
|
||||||
factor := cPropagationDelayFallFactor
|
if propagationDelay > r.propagationDelay {
|
||||||
if propagationDelay > r.propagationDelay {
|
factor = cPropagationDelayRiseFactor
|
||||||
factor = cPropagationDelayRiseFactor
|
|
||||||
}
|
|
||||||
fields := append(
|
|
||||||
getPropagationFields(),
|
|
||||||
"adjustedPropagationDelay", r.propagationDelay+time.Duration(factor*float64(propagationDelay-r.propagationDelay)),
|
|
||||||
) // TODO-REMOVE
|
|
||||||
r.logger.Debugw("adapting propagation delay", fields...) // TODO-REMOVE
|
|
||||||
r.propagationDelay += time.Duration(factor * float64(propagationDelay-r.propagationDelay))
|
|
||||||
}
|
}
|
||||||
|
adjustedPropagationDelay := r.propagationDelay + time.Duration(factor*float64(propagationDelay-r.propagationDelay)) // TODO-REMOVE
|
||||||
|
fields := append(
|
||||||
|
getPropagationFields(),
|
||||||
|
"adjustedPropagationDelay", adjustedPropagationDelay.String(),
|
||||||
|
) // TODO-REMOVE
|
||||||
|
r.logger.Debugw("adapting propagation delay", fields...) // TODO-REMOVE
|
||||||
|
r.propagationDelay += time.Duration(factor * float64(propagationDelay-r.propagationDelay))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
r.propagationDelayDeltaHighCount = 0
|
r.propagationDelayDeltaHighCount = 0
|
||||||
r.propagationDelayDeltaHighStartTime = time.Time{}
|
r.propagationDelayDeltaHighStartTime = time.Time{}
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.longTermDeltaPropagationDelay == 0 {
|
if r.longTermDeltaPropagationDelay == 0 {
|
||||||
r.longTermDeltaPropagationDelay = deltaPropagationDelay
|
r.longTermDeltaPropagationDelay = deltaPropagationDelay
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user