Update RTPSender::IsFecPacket for FlexFEC.

BUG=webrtc:5654

Review-Url: https://codereview.webrtc.org/2496113003
Cr-Commit-Position: refs/heads/master@{#15067}
This commit is contained in:
brandtr 2016-11-14 05:37:16 -08:00 committed by Commit bot
parent 9dfff29bc4
commit 9e795c6ad8

View File

@ -807,14 +807,18 @@ void RTPSender::UpdateRtpStats(const RtpPacketToSend& packet,
}
bool RTPSender::IsFecPacket(const RtpPacketToSend& packet) const {
if (!video_) {
if (!video_)
return false;
}
// FlexFEC.
if (packet.Ssrc() == FlexfecSsrc())
return true;
// RED+ULPFEC.
int pt_red;
int pt_fec;
video_->GetUlpfecConfig(&pt_red, &pt_fec);
const bool fec_enabled = (pt_fec != -1);
return fec_enabled && static_cast<int>(packet.PayloadType()) == pt_red &&
return static_cast<int>(packet.PayloadType()) == pt_red &&
static_cast<int>(packet.payload()[0]) == pt_fec;
}