Index: webrtc/modules/congestion_controller/probe_controller.cc |
diff --git a/webrtc/modules/congestion_controller/probe_controller.cc b/webrtc/modules/congestion_controller/probe_controller.cc |
index bf81517b7044d33be4ecd3fcf38896df8ff560b6..f7f42aa9b988d86f6c811cf144929ada4f0795ea 100644 |
--- a/webrtc/modules/congestion_controller/probe_controller.cc |
+++ b/webrtc/modules/congestion_controller/probe_controller.cc |
@@ -71,6 +71,8 @@ void ProbeController::SetBitrates(int64_t min_bitrate_bps, |
start_bitrate_bps_ = min_bitrate_bps; |
} |
+ // The reason we set use the variable |old_max_bitrate_pbs| is because we |
stefan-webrtc
2017/01/16 13:23:59
-set
philipel
2017/01/16 13:59:28
Done.
|
+ // need to set |max_bitrate_bps_| before we call InitiateProbing. |
int64_t old_max_bitrate_bps = max_bitrate_bps_; |
max_bitrate_bps_ = max_bitrate_bps; |
@@ -84,10 +86,11 @@ void ProbeController::SetBitrates(int64_t min_bitrate_bps, |
break; |
case State::kProbingComplete: |
- // Initiate probing when |max_bitrate_| was increased mid-call. |
- if (estimated_bitrate_bps_ != kExponentialProbingDisabled && |
- estimated_bitrate_bps_ < old_max_bitrate_bps && |
- max_bitrate_bps_ > old_max_bitrate_bps) { |
+ // If the new max bitrate is higher than the old max bitrate and the |
+ // estimate is lower than the new max bitrate then initiate probing. |
+ if (estimated_bitrate_bps_ != 0 && |
stefan-webrtc
2017/01/16 13:23:59
Should probably still compare with kExponentialPro
philipel
2017/01/16 13:59:28
This logic is not related to exponential probing,
|
+ old_max_bitrate_bps < max_bitrate_bps_ && |
+ estimated_bitrate_bps_ < max_bitrate_bps_) { |
InitiateProbing(clock_->TimeInMilliseconds(), {max_bitrate_bps}, false); |
} |
break; |