Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix quality report when packet count regresses
Due to a bug in Firefox and/or Janus, when using simulcast video the remote report for one of the streams (typically the lowest quality one) may start with garbage values. This causes the received packet count to be reported the maximum integer value minus the packet lost count (which is usually around a few thousands). When newer stats arrive the received packets start to increase from that extremely high value, and eventually it overflows, causing the received packet count to go back from ~4294967295 to ~0. In other cases it was seen that the received packet count can regress a few values, although it is not clear when or why (this was much rarer and not reproducible, unlike the scenario described above). To prevent the regressed value from distorting the analysis due to the packet count being < 0, and as in both cases once the packet count regressed the received packet count in all following stat reports increase from the regressed value, now the stats are reset when a lower packet count is found. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
- Loading branch information