Fix div by 0 crash in stream timing stats (jitter)
This commit is contained in:
parent
ebe6aef62d
commit
e677dc7d16
@ -81,7 +81,8 @@ StreamTiming::Stats StreamTiming::stats(uint portId, uint guid)
|
|||||||
return stats;
|
return stats;
|
||||||
|
|
||||||
stats.latency = timespecToNsecs(t.sumDelays)/t.countDelays;
|
stats.latency = timespecToNsecs(t.sumDelays)/t.countDelays;
|
||||||
stats.jitter = t.sumJitter/(t.countDelays-1);
|
if (t.countDelays > 1)
|
||||||
|
stats.jitter = t.sumJitter/(t.countDelays-1);
|
||||||
|
|
||||||
return stats;
|
return stats;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user