Skip to content

Commit

Permalink
#247. Take into consideration that there may be more lost packets th…
Browse files Browse the repository at this point in the history
…an expected
  • Loading branch information
jmillan committed Mar 18, 2019
1 parent 345327c commit e631fde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worker/src/RTC/RtpStreamRecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ namespace RTC
else
lost -= repaired;

// Calculate packet loss percentage in this interva.
float lossPercentage = lost * 100 / expected;
// Calculate packet loss percentage in this interval.
float lossPercentage = lost * 100 / (expected > lost ? expected : lost);

/*
* Calculate score. Starting from a score of 100:
Expand Down

0 comments on commit e631fde

Please sign in to comment.