DCHECK that the red payload type doesn't have invalid values when FEC is enabled.

Review-Url: https://codereview.webrtc.org/2036083002
Cr-Commit-Position: refs/heads/master@{#13028}
This commit is contained in:
stefan
2016-06-03 01:45:36 -07:00
committed by Commit bot
parent 1a93cdeabe
commit fc715f584f

View File

@ -169,6 +169,7 @@ void RTPSenderVideo::SendVideoPacketAsRed(uint8_t* data_buffer,
void RTPSenderVideo::SetGenericFECStatus(const bool enable,
const uint8_t payloadTypeRED,
const uint8_t payloadTypeFEC) {
RTC_DCHECK(!enable || payloadTypeRED > 0);
rtc::CritScope cs(&crit_);
fec_enabled_ = enable;
red_payload_type_ = payloadTypeRED;