red: add red closer to opus in the SDP
this makes the association between opus and red a bit more obvious.
Also it allows access to the opus payload type which might be
used in the fmtp line in a future CL
BUG=webrtc:11640
Change-Id: I04e0648aedf049d103e3c3481c8712dfc9b79538
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178800
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31868}
diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc
index 590c31e..749f250 100644
--- a/media/engine/webrtc_voice_engine.cc
+++ b/media/engine/webrtc_voice_engine.cc
@@ -722,6 +722,11 @@
}
out.push_back(codec);
+
+ if (codec.name == kOpusCodecName &&
+ IsAudioRedForOpusFieldTrialEnabled()) {
+ map_format({kRedCodecName, 48000, 2}, &out);
+ }
}
}
@@ -732,11 +737,6 @@
}
}
- // Add red codec.
- if (IsAudioRedForOpusFieldTrialEnabled()) {
- map_format({kRedCodecName, 48000, 2}, &out);
- }
-
// Add telephone-event codecs last.
for (const auto& dtmf : generate_dtmf) {
if (dtmf.second) {