Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.cc

Issue 2496113003: Update RTPSender::IsFecPacket for FlexFEC. (Closed)
Patch Set: Rebase on top of master. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_sender.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
index 36915c53afeb7fdf9c3a18bf7de53ce4d7f67f84..2bff097d63a6a974cc3054984cd7624007586fbe 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
@@ -787,14 +787,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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698