diff --git a/worker/test/src/RTC/TestTransportCongestionControlServer.cpp b/worker/test/src/RTC/TestTransportCongestionControlServer.cpp index 27512b2b37..3a02b433ba 100644 --- a/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +++ b/worker/test/src/RTC/TestTransportCongestionControlServer.cpp @@ -93,7 +93,7 @@ void validate(std::vector& inputs, Te tccServer.SetMaxIncomingBitrate(150000); tccServer.TransportConnected(); - RtpPacket* packet = RtpPacket::Parse(buffer, sizeof(buffer)); + std::unique_ptr packet{ RtpPacket::Parse(buffer, sizeof(buffer)) }; packet->SetTransportWideCc01ExtensionId(5); packet->SetSequenceNumber(1); @@ -116,7 +116,7 @@ void validate(std::vector& inputs, Te } packet->UpdateTransportWideCc01(input.wideSeqNumber); - tccServer.IncomingPacket(input.nowMs, packet); + tccServer.IncomingPacket(input.nowMs, packet.get()); } tccServer.FillAndSendTransportCcFeedback();