Index: webrtc/modules/rtp_rtcp/source/rtp_utility.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc |
index d003c0bdb0a511f2190b51e6b1b46e17297c518f..4cd61eccc2c80308a06df1c7cbb18f9c6c484eea 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtp_utility.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtp_utility.cc |
@@ -296,9 +296,14 @@ bool RtpHeaderParser::Parse(RTPHeader* header, |
} |
header->headerLength += XLen; |
} |
- if (header->headerLength + header->paddingLength > |
- static_cast<size_t>(length)) |
+ // If the packet consists of only the header, then ignore the padding length. |
+ // This is likely only happening when parsing a header-only rtpdump file, |
+ // where the payloads have been stripped out. |
+ if (header->headerLength != static_cast<size_t>(length) && |
danilchap
2017/05/31 17:30:21
this change looks dangerous to me:
It will not be
danilchap
2017/05/31 18:57:14
Realized there is a simpler solution:
if (headerLe
hlundin-webrtc
2017/05/31 21:02:56
But that solution does in fact parse out values th
danilchap
2017/06/01 09:45:15
HeaderParser need to fill RTPHeader structure and
|
+ header->headerLength + header->paddingLength > |
+ static_cast<size_t>(length)) { |
return false; |
+ } |
return true; |
} |