Index: webrtc/video/send_statistics_proxy.cc |
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc |
index a996976e5d48aa8fa0ea33be0bba100f129ef94a..1f0ee2cb7a8e0806a3cf3b2b53168ff9a7520687 100644 |
--- a/webrtc/video/send_statistics_proxy.cc |
+++ b/webrtc/video/send_statistics_proxy.cc |
@@ -344,7 +344,8 @@ void SendStatisticsProxy::UmaSamplesContainer::UpdateHistograms( |
static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec / |
1000)); |
} |
- if (rtp_config.ulpfec.red_payload_type != -1) { |
+ if (rtp_config.flexfec.flexfec_payload_type != -1 || |
+ rtp_config.ulpfec.red_payload_type != -1) { |
RTC_HISTOGRAMS_COUNTS_10000(kIndex, |
uma_prefix_ + "FecBitrateSentInKbps", |
static_cast<int>(rtp_rtx.fec.TotalBytes() * |
@@ -418,15 +419,15 @@ VideoSendStream::StreamStats* SendStatisticsProxy::GetStatsEntry( |
if (it != stats_.substreams.end()) |
return &it->second; |
- bool is_rtx = false; |
- if (std::find(rtp_config_.ssrcs.begin(), rtp_config_.ssrcs.end(), ssrc) == |
- rtp_config_.ssrcs.end()) { |
- if (std::find(rtp_config_.rtx.ssrcs.begin(), rtp_config_.rtx.ssrcs.end(), |
- ssrc) == rtp_config_.rtx.ssrcs.end()) { |
- return nullptr; |
- } |
- is_rtx = true; |
- } |
+ bool is_media = std::find(rtp_config_.ssrcs.begin(), rtp_config_.ssrcs.end(), |
+ ssrc) != rtp_config_.ssrcs.end(); |
+ bool is_flexfec = rtp_config_.flexfec.flexfec_payload_type != -1 && |
+ ssrc == rtp_config_.flexfec.flexfec_ssrc; |
+ bool is_rtx = |
+ std::find(rtp_config_.rtx.ssrcs.begin(), rtp_config_.rtx.ssrcs.end(), |
+ ssrc) != rtp_config_.rtx.ssrcs.end(); |
+ if (!is_media && !is_flexfec && !is_rtx) |
+ return nullptr; |
// Insert new entry and return ptr. |
VideoSendStream::StreamStats* entry = &stats_.substreams[ssrc]; |