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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_packet.h

Issue 2576653003: In RtpPacket do not keep pointer to RtpHeaderExtensionMap (Closed)
Patch Set: Fix bug catched by msan Created 4 years 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 | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_packet.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_packet.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_packet.h b/webrtc/modules/rtp_rtcp/source/rtp_packet.h
index 3f4d5769ba9156d5c399941a2dc0f157256921e1..2b3d38ec49f0310dcea3b639996c265b018bf479 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_packet.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_packet.h
@@ -35,10 +35,8 @@ class Packet {
// Parse and move given buffer into Packet.
bool Parse(rtc::CopyOnWriteBuffer packet);
- // Maps parsed extensions to their types to allow use of GetExtension.
- // Used after parsing when |extensions| can't be provided until base rtp
- // header is parsed.
- void IdentifyExtensions(const ExtensionManager* extensions);
+ // Maps extensions id to their types.
+ void IdentifyExtensions(const ExtensionManager& extensions);
// Header.
bool Marker() const;
@@ -106,6 +104,7 @@ class Packet {
// packet creating and used if available in Parse function.
// Adding and getting extensions will fail until |extensions| is
// provided via constructor or IdentifyExtensions function.
+ Packet();
explicit Packet(const ExtensionManager* extensions);
Packet(const Packet&) = default;
Packet(const ExtensionManager* extensions, size_t capacity);
@@ -144,8 +143,6 @@ class Packet {
uint8_t* WriteAt(size_t offset);
void WriteAt(size_t offset, uint8_t byte);
- const ExtensionManager* extensions_;
-
// Header.
bool marker_;
uint8_t payload_type_;
@@ -156,12 +153,9 @@ class Packet {
size_t payload_offset_; // Match header size with csrcs and extensions.
size_t payload_size_;
- uint8_t num_extensions_ = 0;
ExtensionInfo extension_entries_[kMaxExtensionHeaders];
uint16_t extensions_size_ = 0; // Unaligned.
rtc::CopyOnWriteBuffer buffer_;
-
- Packet() = delete;
};
template <typename Extension>
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_packet.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698