Chromium Code Reviews| Index: webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc |
| diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc |
| index ab666cec2c4c616ab9382c69c154a7f793faf072..aff184e76b4565925bd4dc9de9c00129215cfaa1 100644 |
| --- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc |
| +++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api.cc |
| @@ -52,9 +52,12 @@ bool LoopBackTransport::SendRtp(const uint8_t* data, |
| &payload_specific)) { |
| return false; |
| } |
| + const uint8_t* payload = |
| + static_cast<const uint8_t*>(data) + header.headerLength; |
|
danilchap
2016/10/03 13:51:19
static_cast is not needed here (it casts to same t
ossu
2016/10/03 14:12:03
Acknowledged.
|
| + assert(len >= header.headerLength); |
|
danilchap
2016/10/03 13:51:19
RTC_DCHECK_GE(len, header.headerLength)
ossu
2016/10/03 14:12:03
You are right on both counts! I just borrowed this
|
| + const size_t payload_length = len - header.headerLength; |
|
danilchap
2016/10/03 13:51:19
may be just "size_t payload_length":
function tail
ossu
2016/10/03 14:12:03
Granted, it's not strictly necessary. However, I'm
|
| receive_statistics_->IncomingPacket(header, len, false); |
| - if (!rtp_receiver_->IncomingRtpPacket(header, |
| - static_cast<const uint8_t*>(data), len, |
| + if (!rtp_receiver_->IncomingRtpPacket(header, payload, payload_length, |
| payload_specific, true)) { |
| return false; |
| } |