| 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 f4933afdd90e7e7382f148b4410bc8a4747ff878..19d53c5459d07450e19abae44297c1b60aa9c5a0 100644
|
| --- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
|
| +++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
|
| @@ -1456,8 +1456,9 @@ bool RTPSender::FindHeaderExtensionPosition(RTPExtensionType type,
|
|
|
| HeaderExtension header_extension(type);
|
|
|
| - size_t block_pos =
|
| - kRtpHeaderLength + rtp_header.numCSRCs + extension_block_pos;
|
| + size_t extension_pos =
|
| + kRtpHeaderLength + rtp_header.numCSRCs * sizeof(uint32_t);
|
| + size_t block_pos = extension_pos + extension_block_pos;
|
| if (rtp_packet_length < block_pos + header_extension.length ||
|
| rtp_header.headerLength < block_pos + header_extension.length) {
|
| LOG(LS_WARNING) << "Failed to find extension position for " << type
|
| @@ -1466,8 +1467,8 @@ bool RTPSender::FindHeaderExtensionPosition(RTPExtensionType type,
|
| }
|
|
|
| // Verify that header contains extension.
|
| - if (!((rtp_packet[kRtpHeaderLength + rtp_header.numCSRCs] == 0xBE) &&
|
| - (rtp_packet[kRtpHeaderLength + rtp_header.numCSRCs + 1] == 0xDE))) {
|
| + if (!(rtp_packet[extension_pos] == 0xBE &&
|
| + rtp_packet[extension_pos + 1] == 0xDE)) {
|
| LOG(LS_WARNING) << "Failed to find extension position for " << type
|
| << "as hdr extension not found.";
|
| return false;
|
| @@ -1494,14 +1495,6 @@ RTPSender::ExtensionStatus RTPSender::VerifyExtension(
|
| rtp_packet_length, rtp_header, &block_pos))
|
| return ExtensionStatus::kError;
|
|
|
| - // Verify that header contains extension.
|
| - if (!((rtp_packet[kRtpHeaderLength + rtp_header.numCSRCs] == 0xBE) &&
|
| - (rtp_packet[kRtpHeaderLength + rtp_header.numCSRCs + 1] == 0xDE))) {
|
| - LOG(LS_WARNING)
|
| - << "Failed to update absolute send time, hdr extension not found.";
|
| - return ExtensionStatus::kError;
|
| - }
|
| -
|
| // Verify first byte in block.
|
| const uint8_t first_block_byte = (id << 4) + (extension_length_bytes - 2);
|
| if (rtp_packet[block_pos] != first_block_byte)
|
|
|