Skip to content

Commit 5d5fca1

Browse files
committed
fix for Windows
1 parent fe0eaae commit 5d5fca1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

worker/src/RTC/RTP/SharedPacket.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ namespace RTC
151151

152152
const size_t bufferLength = packet->GetLength() + PacketBufferLengthIncrement;
153153

154-
// NOTE: Buffer must be 4-byte aligned since RTP Packet parsing casts it to
154+
// NOTE: Buffer must be 4-byte aligned since RTP packet parsing casts it to
155155
// structs (e.g. FixedHeader, HeaderExtension) that require 4-byte alignment.
156-
auto* buffer = new (std::align_val_t{ 4 }) uint8_t[bufferLength];
156+
auto* buffer = static_cast<uint8_t*>(::operator new[](bufferLength, std::align_val_t{ 4 }));
157157
auto* clonedPacket = packet->Clone(buffer, bufferLength);
158158

159159
// Set a listener in the Packet to deallocate its buffer once the Packet

0 commit comments

Comments
 (0)