diff --git a/webrtc/WebRtcTransport.cpp b/webrtc/WebRtcTransport.cpp index 159fec74..fc3e5c9e 100644 --- a/webrtc/WebRtcTransport.cpp +++ b/webrtc/WebRtcTransport.cpp @@ -385,10 +385,10 @@ void WebRtcTransportImp::onStartWebRTC() { _ssrc_to_track[track->offer_ssrc_rtx] = track; //rtp pt --> MediaTrack - _pt_to_track.emplace(track->plan_rtp->pt, new WrappedRtpTrack(track, _twcc_ctx, *this)); + _pt_to_track.emplace(track->plan_rtp->pt, std::unique_ptr(new WrappedRtpTrack(track, _twcc_ctx, *this))); if (track->plan_rtx) { //rtx pt --> MediaTrack - _pt_to_track.emplace(track->plan_rtx->pt, new WrappedRtxTrack(track)); + _pt_to_track.emplace(track->plan_rtx->pt, std::unique_ptr(new WrappedRtxTrack(track))); } if (m_offer->type != TrackApplication) { //记录rtp ext类型与id的关系,方便接收或发送rtp时修改rtp ext id