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

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

Issue 3014463002: Break rtp_rtcp_format out of rtp_rtcp, to resolve circular dependencies (Closed)
Patch Set: copied a warning supressor Created 3 years, 3 months 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 | « webrtc/modules/rtp_rtcp/BUILD.gn ('k') | 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/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) {
« no previous file with comments | « webrtc/modules/rtp_rtcp/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698