Index: webrtc/modules/rtp_rtcp/source/byte_io.h |
diff --git a/webrtc/modules/rtp_rtcp/source/byte_io.h b/webrtc/modules/rtp_rtcp/source/byte_io.h |
index 1724bb0a2e5951fb29472049f535be627cf0835b..cd2a2bea542a4807c9161a37a4616c3458f1b333 100644 |
--- a/webrtc/modules/rtp_rtcp/source/byte_io.h |
+++ b/webrtc/modules/rtp_rtcp/source/byte_io.h |
@@ -36,9 +36,10 @@ |
// it easy for the compiler to completely inline the reading/writing. |
-#include <limits> |
+#include <stddef.h> |
eladalon
2017/09/12 14:45:07
By the way, for my information, don't we prefer to
danilchap
2017/09/12 15:17:18
I've reverted this file alltogether,
but generally
eladalon
2017/09/12 15:25:24
Acknowledged.
|
+#include <stdint.h> |
-#include "webrtc/typedefs.h" |
+#include <limits> |
namespace webrtc { |
@@ -403,6 +404,12 @@ class ByteWriter<T, 8, false> { |
} |
}; |
+// Round up to the nearest size that is a multiple of 4. |
+inline size_t Word32Align(size_t size) { |
+ // Same as increment by 3 and clear last two bits. |
+ return (size + 3) & ~0x3; |
eladalon
2017/09/12 14:45:07
Is this the safest way to do this?
1. There are so
danilchap
2017/09/12 15:17:17
2. Moved inside rtp_header_extension_map where siz
|
+} |
+ |
} // namespace webrtc |
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_BYTE_IO_H_ |