Enable send side audio TWCC only if WebRTC-Audio-ForceNoTWCC is not enabled.

This will avoid enabling TWCC for calls having WebRTC-Audio-SendSideBwe enabled on one side of the call but not on the other.

Currently the side supporting audio BWE indicates TWCC extension in SDP but the side that does not support will not. As the result the not supporting side will send TWCC but will not use it and the side supporting audio BWE will not send TWCC.

Bug: webrtc:8243
Change-Id: I4d59e78998982051004b8ad86c24b9be34fc095f
Reviewed-on: https://webrtc-review.googlesource.com/82803
Commit-Queue: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23583}
diff --git a/audio/audio_send_stream.cc b/audio/audio_send_stream.cc
index 8798d43..fe95559 100644
--- a/audio/audio_send_stream.cc
+++ b/audio/audio_send_stream.cc
@@ -242,13 +242,17 @@
   }
   bool transport_seq_num_id_changed =
       new_ids.transport_sequence_number != old_ids.transport_sequence_number;
-  if (first_time || transport_seq_num_id_changed) {
+  if (first_time ||
+      (transport_seq_num_id_changed &&
+       !webrtc::field_trial::IsEnabled("WebRTC-Audio-ForceNoTWCC"))) {
     if (!first_time) {
       channel_proxy->ResetSenderCongestionControlObjects();
     }
 
     RtcpBandwidthObserver* bandwidth_observer = nullptr;
-    bool has_transport_sequence_number = new_ids.transport_sequence_number != 0;
+    bool has_transport_sequence_number =
+        new_ids.transport_sequence_number != 0 &&
+        !webrtc::field_trial::IsEnabled("WebRTC-Audio-ForceNoTWCC");
     if (has_transport_sequence_number) {
       channel_proxy->EnableSendTransportSequenceNumber(
           new_ids.transport_sequence_number);
@@ -287,7 +291,8 @@
   }
 
   bool has_transport_sequence_number =
-      FindExtensionIds(config_.rtp.extensions).transport_sequence_number != 0;
+      FindExtensionIds(config_.rtp.extensions).transport_sequence_number != 0 &&
+      !webrtc::field_trial::IsEnabled("WebRTC-Audio-ForceNoTWCC");
   if (config_.min_bitrate_bps != -1 && config_.max_bitrate_bps != -1 &&
       (has_transport_sequence_number ||
        !webrtc::field_trial::IsEnabled("WebRTC-Audio-SendSideBwe"))) {