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

Side by Side Diff: webrtc/modules/congestion_controller/send_side_congestion_controller.cc

Issue 2820353002: Fix crash when all acks in a feedback message arrive too late. (Closed)
Patch Set: Add test. Created 3 years, 8 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/modules/congestion_controller/delay_based_bwe_unittest.cc ('k') | no next file » | 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 transport_feedback_adapter_.AddPacket(ssrc, sequence_number, length, 233 transport_feedback_adapter_.AddPacket(ssrc, sequence_number, length,
234 pacing_info); 234 pacing_info);
235 } 235 }
236 236
237 void SendSideCongestionController::OnTransportFeedback( 237 void SendSideCongestionController::OnTransportFeedback(
238 const rtcp::TransportFeedback& feedback) { 238 const rtcp::TransportFeedback& feedback) {
239 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 239 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
240 transport_feedback_adapter_.OnTransportFeedback(feedback); 240 transport_feedback_adapter_.OnTransportFeedback(feedback);
241 std::vector<PacketFeedback> feedback_vector = 241 std::vector<PacketFeedback> feedback_vector =
242 transport_feedback_adapter_.GetTransportFeedbackVector(); 242 transport_feedback_adapter_.GetTransportFeedbackVector();
243 if (feedback_vector.empty())
244 return;
245 DelayBasedBwe::Result result; 243 DelayBasedBwe::Result result;
246 { 244 {
247 rtc::CritScope cs(&bwe_lock_); 245 rtc::CritScope cs(&bwe_lock_);
248 result = delay_based_bwe_->IncomingPacketFeedbackVector(feedback_vector); 246 result = delay_based_bwe_->IncomingPacketFeedbackVector(feedback_vector);
249 } 247 }
250 if (result.updated) 248 if (result.updated)
251 bitrate_controller_->OnDelayBasedBweResult(result); 249 bitrate_controller_->OnDelayBasedBweResult(result);
252 } 250 }
253 251
254 std::vector<PacketFeedback> 252 std::vector<PacketFeedback>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 bool SendSideCongestionController::IsSendQueueFull() const { 307 bool SendSideCongestionController::IsSendQueueFull() const {
310 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; 308 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs;
311 } 309 }
312 310
313 bool SendSideCongestionController::IsNetworkDown() const { 311 bool SendSideCongestionController::IsNetworkDown() const {
314 rtc::CritScope cs(&network_state_lock_); 312 rtc::CritScope cs(&network_state_lock_);
315 return network_state_ == kNetworkDown; 313 return network_state_ == kNetworkDown;
316 } 314 }
317 315
318 } // namespace webrtc 316 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/congestion_controller/delay_based_bwe_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698