Refactor of RtpPacket constructor
Bug: None Change-Id: I869d654cb28bc6d8291d77d6b0c45a68a4232a38 Reviewed-on: https://webrtc-review.googlesource.com/c/107887 Commit-Queue: Johannes Kron <kron@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26607}
This commit is contained in:
parent
7ff164e6e1
commit
3dd473b224
@ -61,12 +61,10 @@ RtpPacket::RtpPacket(const ExtensionManager* extensions)
|
|||||||
RtpPacket::RtpPacket(const RtpPacket&) = default;
|
RtpPacket::RtpPacket(const RtpPacket&) = default;
|
||||||
|
|
||||||
RtpPacket::RtpPacket(const ExtensionManager* extensions, size_t capacity)
|
RtpPacket::RtpPacket(const ExtensionManager* extensions, size_t capacity)
|
||||||
: buffer_(capacity) {
|
: extensions_(extensions ? *extensions : ExtensionManager()),
|
||||||
|
buffer_(capacity) {
|
||||||
RTC_DCHECK_GE(capacity, kFixedHeaderSize);
|
RTC_DCHECK_GE(capacity, kFixedHeaderSize);
|
||||||
Clear();
|
Clear();
|
||||||
if (extensions) {
|
|
||||||
extensions_ = *extensions;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RtpPacket::~RtpPacket() {}
|
RtpPacket::~RtpPacket() {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user