Chromium Code Reviews| Index: webrtc/video/vie_channel.cc |
| diff --git a/webrtc/video/vie_channel.cc b/webrtc/video/vie_channel.cc |
| index 532979dda7ed28ff5b73a964fcb7495a7d24ff49..6950f10556f21628f20a9bd47018e435ae76c6c1 100644 |
| --- a/webrtc/video/vie_channel.cc |
| +++ b/webrtc/video/vie_channel.cc |
| @@ -424,12 +424,13 @@ void ViEChannel::SetProtectionMode(bool enable_nack, |
| int payload_type_red, |
| int payload_type_fec) { |
| // Validate payload types. |
| - if (enable_fec) { |
| + if (enable_fec || payload_type_red != -1 || payload_type_fec != -1) { |
|
stefan-webrtc
2016/02/12 10:46:27
Shouldn't this be:
enable_fec && payload_type_red
pbos-webrtc
2016/02/12 12:00:27
Comment updated.
|
| RTC_DCHECK_GE(payload_type_red, 0); |
| RTC_DCHECK_GE(payload_type_fec, 0); |
| RTC_DCHECK_LE(payload_type_red, 127); |
| RTC_DCHECK_LE(payload_type_fec, 127); |
| } else { |
| + // Payload types unset. |
| RTC_DCHECK_EQ(payload_type_red, -1); |
| RTC_DCHECK_EQ(payload_type_fec, -1); |
| // Set to valid uint8_ts to be castable later without signed overflows. |