Chromium Code Reviews| Index: webrtc/video/video_send_stream.cc |
| diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc |
| index cb6689e1179bdfb24e7543fd2797a0b4e3d5be41..10d3cfd3ed59658eb783d19785a853a3e00d76cf 100644 |
| --- a/webrtc/video/video_send_stream.cc |
| +++ b/webrtc/video/video_send_stream.cc |
| @@ -936,10 +936,6 @@ void VideoSendStreamImpl::ConfigureProtection() { |
| enable_protection_fec = false; |
| } |
| - // Set to valid uint8_ts to be castable later without signed overflows. |
| - uint8_t payload_type_red = 0; |
| - uint8_t payload_type_fec = 0; |
| - |
| // TODO(changbin): Should set RTX for RED mapping in RTP sender in future. |
| // Validate payload types. If either RED or FEC payload types are set then |
| // both should be. If FEC is enabled then they both have to be set. |
| @@ -951,14 +947,10 @@ void VideoSendStreamImpl::ConfigureProtection() { |
| // assumes rtx packets are containing red if it has been configured to |
| // receive red. Remove this in a few versions once the incompatibility |
| // issue is resolved (M53 timeframe). |
| - payload_type_red = |
| - static_cast<uint8_t>(config_->rtp.ulpfec.red_payload_type); |
|
stefan-webrtc
2016/10/31 09:33:16
I think the TODO above becomes a bit strange when
brandtr
2016/10/31 12:47:03
Yeah, you are right. This whole function will be c
|
| } |
| if (config_->rtp.ulpfec.ulpfec_payload_type != -1) { |
| RTC_DCHECK_GE(config_->rtp.ulpfec.ulpfec_payload_type, 0); |
| RTC_DCHECK_LE(config_->rtp.ulpfec.ulpfec_payload_type, 127); |
| - payload_type_fec = |
| - static_cast<uint8_t>(config_->rtp.ulpfec.ulpfec_payload_type); |
| } |
| for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
| @@ -968,8 +960,9 @@ void VideoSendStreamImpl::ConfigureProtection() { |
| kMinSendSidePacketHistorySize); |
| // Set FEC. |
| for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { |
| - rtp_rtcp->SetGenericFECStatus(enable_protection_fec, payload_type_red, |
| - payload_type_fec); |
| + rtp_rtcp->SetUlpfecConfig(enable_protection_fec, |
| + config_->rtp.ulpfec.red_payload_type, |
| + config_->rtp.ulpfec.ulpfec_payload_type); |
| } |
| } |