When processing report blocks do not store rtt when it is not calculated

Otherwise bandwidth observer might miss rtt calculated from previous report block

Bug: webrtc:8805
Change-Id: If3c4f4ee2e923d440ff352e8b770442f1a11fa34
Reviewed-on: https://webrtc-review.googlesource.com/44480
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21800}
This commit is contained in:
Danil Chapovalov
2018-01-26 20:01:48 +01:00
committed by Commit Bot
parent 82f96e6a56
commit 04164cc5ac
2 changed files with 29 additions and 2 deletions

View File

@ -502,12 +502,12 @@ void RTCPReceiver::HandleReportBlock(const ReportBlock& report_block,
report_block_info->last_rtt_ms = rtt_ms;
report_block_info->sum_rtt_ms += rtt_ms;
++report_block_info->num_rtts;
packet_information->rtt_ms = rtt_ms;
}
TRACE_COUNTER_ID1(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "RR_RTT",
report_block.source_ssrc(), rtt_ms);
packet_information->rtt_ms = rtt_ms;
packet_information->report_blocks.push_back(report_block_info->report_block);
}