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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 LOG(LS_WARNING) 197 LOG(LS_WARNING)
198 << "Two Voip Metric blocks found in same Extended Report packet"; 198 << "Two Voip Metric blocks found in same Extended Report packet";
199 return; 199 return;
200 } 200 }
201 voip_metric_block_.emplace(); 201 voip_metric_block_.emplace();
202 voip_metric_block_->Parse(block); 202 voip_metric_block_->Parse(block);
203 } 203 }
204 204
205 void ExtendedReports::ParseTargetBitrateBlock(const uint8_t* block, 205 void ExtendedReports::ParseTargetBitrateBlock(const uint8_t* block,
206 uint16_t block_length) { 206 uint16_t block_length) {
207 target_bitrate_ = rtc::Optional<TargetBitrate>(TargetBitrate()); 207 target_bitrate_.emplace();
208 if (!target_bitrate_->Parse(block, block_length)) 208 target_bitrate_->Parse(block, block_length);
209 target_bitrate_ = rtc::Optional<TargetBitrate>();
210 } 209 }
211 } // namespace rtcp 210 } // namespace rtcp
212 } // namespace webrtc 211 } // namespace webrtc
OLDNEW
« 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