Chromium Code Reviews| Index: webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc |
| diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc b/webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc |
| index d65b11d5cf22a4d310986a7fe95bf76b4ead7615..3d48ef08bac7410a24a06b685a16875ebb25a0a6 100644 |
| --- a/webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc |
| +++ b/webrtc/modules/rtp_rtcp/source/rtp_header_extension_map.cc |
| @@ -11,7 +11,6 @@ |
| #include "webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h" |
| #include "webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h" |
| -#include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
| #include "webrtc/rtc_base/arraysize.h" |
| #include "webrtc/rtc_base/checks.h" |
| #include "webrtc/rtc_base/logging.h" |
| @@ -19,8 +18,6 @@ |
| namespace webrtc { |
| namespace { |
| -using RtpUtility::Word32Align; |
| - |
| struct ExtensionInfo { |
| RTPExtensionType type; |
| const char* uri; |
| @@ -102,7 +99,10 @@ size_t RtpHeaderExtensionMap::GetTotalLengthInBytes( |
| } |
| if (values_size == 0) |
| return 0; |
| - return Word32Align(kRtpOneByteHeaderLength + values_size); |
| + size_t size = kRtpOneByteHeaderLength + values_size; |
| + // Round up to the nearest size that is a multiple of 4. |
| + // Which is same as round down (size + 3). |
| + return size + 3 - (size + 3) % 4; |
|
eladalon
2017/09/12 15:25:24
I still think this would be safer, clearer and mor
danilchap
2017/09/12 15:40:31
For any reasonable use (there are up to 16 types o
|
| } |
| int32_t RtpHeaderExtensionMap::Deregister(RTPExtensionType type) { |