DefaultAudioQualityAnalyzer: use bytes_recv instead of packets_recv.
Bug: webrtc:10138 Change-Id: I2fa5d9da2dd7788ffc48cf6a4171eb3ce0de5423 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135461 Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27866}
This commit is contained in:
parent
2154f751e3
commit
630bd43fcf
@ -45,14 +45,13 @@ void DefaultAudioQualityAnalyzer::OnStatsReports(
|
||||
if (strcmp(media_type->static_string_val(), kStatsAudioMediaType) != 0) {
|
||||
continue;
|
||||
}
|
||||
const webrtc::StatsReport::Value* packets_received =
|
||||
stats_report->FindValue(
|
||||
StatsReport::StatsValueName::kStatsValueNamePacketsReceived);
|
||||
if (!packets_received || packets_received->int_val() == 0) {
|
||||
const webrtc::StatsReport::Value* bytes_received = stats_report->FindValue(
|
||||
StatsReport::StatsValueName::kStatsValueNameBytesReceived);
|
||||
if (bytes_received == nullptr || bytes_received->int64_val() == 0) {
|
||||
// Discarding stats in the following situations:
|
||||
// - When packets_received is not present, because NetEq stats are only
|
||||
// - When bytes_received is not present, because NetEq stats are only
|
||||
// available in recv-side SSRC.
|
||||
// - When packets_received is present but its value is 0. This means
|
||||
// - When bytes_received is present but its value is 0. This means
|
||||
// that media is not yet flowing so there is no need to keep this
|
||||
// stats report into account (since all its fields would be 0).
|
||||
continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user