Index: webrtc/media/engine/webrtcvideoengine2.cc |
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc |
index a47a9ae713d04fab917feecdfbce823dfde99b99..9e7f5c4bd45fdb49a2493d94a6a83600073d88b2 100644 |
--- a/webrtc/media/engine/webrtcvideoengine2.cc |
+++ b/webrtc/media/engine/webrtcvideoengine2.cc |
@@ -1242,7 +1242,16 @@ |
flexfec_config->rtp_header_extensions = config->rtp.extensions; |
} |
- sp.GetFidSsrc(ssrc, &config->rtp.rtx_ssrc); |
+ 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)) { |
+ webrtc::VideoReceiveStream::Config::Rtp::Rtx& rtx = |
+ config->rtp.rtx[recv_codecs_[i].codec.id]; |
+ rtx.ssrc = rtx_ssrc; |
+ rtx.payload_type = recv_codecs_[i].rtx_payload_type; |
+ } |
+ } |
config->rtp.extensions = recv_rtp_extensions_; |
} |
@@ -2192,12 +2201,7 @@ |
config_.decoders.push_back(decoder); |
} |
- 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; |
- } |
- |
+ // TODO(pbos): Reconfigure RTX based on incoming recv_codecs. |
config_.rtp.ulpfec = recv_codecs.front().ulpfec; |
flexfec_config_.payload_type = recv_codecs.front().flexfec_payload_type; |