Index: webrtc/media/engine/webrtcvideoengine2.cc |
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc |
index b0d3b89b8a2115f4b83b576a2f54e125f9d47c04..c8521885bda3ed4c4e7ea0a03c862ba3ee2664dd 100644 |
--- a/webrtc/media/engine/webrtcvideoengine2.cc |
+++ b/webrtc/media/engine/webrtcvideoengine2.cc |
@@ -1242,16 +1242,7 @@ void WebRtcVideoChannel2::ConfigureReceiverRtp( |
flexfec_config->rtp_header_extensions = config->rtp.extensions; |
} |
- for (size_t i = 0; i < recv_codecs_.size(); ++i) { |
- uint32_t rtx_ssrc; |
- if (recv_codecs_[i].rtx_payload_type != -1 && |
- sp.GetFidSsrc(ssrc, &rtx_ssrc)) { |
brandtr
2017/01/20 14:49:22
Since |ssrc| is invariant in this loop, sp.GetFidS
|
- webrtc::VideoReceiveStream::Config::Rtp::Rtx& rtx = |
- config->rtp.rtx[recv_codecs_[i].codec.id]; |
- rtx.ssrc = rtx_ssrc; |
brandtr
2017/01/20 14:49:22
... and therefore all key-value pairs in |rtx| hav
|
- rtx.payload_type = recv_codecs_[i].rtx_payload_type; |
- } |
- } |
+ sp.GetFidSsrc(ssrc, &config->rtp.rtx_ssrc); |
config->rtp.extensions = recv_rtp_extensions_; |
} |
@@ -2198,7 +2189,12 @@ void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ConfigureCodecs( |
config_.decoders.push_back(decoder); |
} |
- // TODO(pbos): Reconfigure RTX based on incoming recv_codecs. |
+ config_.rtp.rtx_payload_types.clear(); |
+ for (const VideoCodecSettings& recv_codec : recv_codecs) { |
+ config_.rtp.rtx_payload_types[recv_codec.codec.id] = |
+ recv_codec.rtx_payload_type; |
+ } |
+ |
config_.rtp.ulpfec = recv_codecs.front().ulpfec; |
flexfec_config_.payload_type = recv_codecs.front().flexfec_payload_type; |