Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.cc

Issue 2947633003: Allow parsing empty RTCP TargetBitrate messages, but stop sending them. (Closed)
Patch Set: Add comment about using ToString only in tests Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/common_types.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet/target_bitrate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.cc
index 583083b6acf2b388d5d75ff6e8b109818fc0b150..d559eefd9d1104c570ac0dd7c3a5ad3e6de85d72 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/extended_reports.cc
@@ -204,9 +204,8 @@ void ExtendedReports::ParseVoipMetricBlock(const uint8_t* block,
void ExtendedReports::ParseTargetBitrateBlock(const uint8_t* block,
uint16_t block_length) {
- target_bitrate_ = rtc::Optional<TargetBitrate>(TargetBitrate());
- if (!target_bitrate_->Parse(block, block_length))
- target_bitrate_ = rtc::Optional<TargetBitrate>();
+ target_bitrate_.emplace();
+ target_bitrate_->Parse(block, block_length);
}
} // namespace rtcp
} // namespace webrtc
« no previous file with comments | « webrtc/common_types.cc ('k') | webrtc/modules/rtp_rtcp/source/rtcp_packet/target_bitrate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698