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

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

Issue 2496113003: Update RTPSender::IsFecPacket for FlexFEC. (Closed)
Patch Set: 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 269e4056fdba66b075ffc32b90e42eee2f534c9a..a63ace51be080d7294e07671108842e2242af887 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
@@ -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);
brandtr 2016/11/14 08:01:34 This was weird. If for some reason a FEC packet wa
danilchap 2016/11/14 10:23:39 look like leftover from older refactorings, agree
- 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