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

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

Issue 2479193002: Finish reformatting RTCPUtility::RTCPParserV2::Validate() (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/rtcp_utility.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc b/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc
index c4f688aac44f7ac0771fcc3ce7494a997fa06399..2c26fa79db3f0df45fd49e43575b5641d1f3aadc 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_utility.cc
@@ -433,24 +433,22 @@ RTCPUtility::RTCPParserV2::Validate()
_ptrRTCPDataEnd - _ptrRTCPDataBegin, &header))
return; // NOT VALID!
- // * if (!reducedSize) : first packet must be RR or SR.
- //
- // * The padding bit (P) should be zero for the first packet of a
- // compound RTCP packet because padding should only be applied,
- // if it is needed, to the last packet. (NOT CHECKED!)
- //
- // * The length fields of the individual RTCP packets must add up
- // to the overall length of the compound RTCP packet as
- // received. This is a fairly strong check. (NOT CHECKED!)
-
- if (!_RTCPReducedSizeEnable)
- {
- if ((header.packet_type != PT_SR) && (header.packet_type != PT_RR)) {
- return; // NOT VALID
- }
- }
+ // * if (!reducedSize) : first packet must be RR or SR.
+ //
+ // * The padding bit (P) should be zero for the first packet of a
+ // compound RTCP packet because padding should only be applied,
+ // if it is needed, to the last packet. (NOT CHECKED!)
+ //
+ // * The length fields of the individual RTCP packets must add up
+ // to the overall length of the compound RTCP packet as
+ // received. This is a fairly strong check. (NOT CHECKED!)
+
+ if (!_RTCPReducedSizeEnable) {
+ if ((header.packet_type != PT_SR) && (header.packet_type != PT_RR))
+ return; // NOT VALID
+ }
- _validPacket = true;
+ _validPacket = true;
}
bool
« 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