Commit 41f8d7fb by ziyue

修复webrtc模块循环引用导致的内存泄露问题:#1024

parent 08e74256
...@@ -436,7 +436,7 @@ void WebRtcTransportImp::onStartWebRTC() { ...@@ -436,7 +436,7 @@ void WebRtcTransportImp::onStartWebRTC() {
if (m_offer->type != TrackApplication) { if (m_offer->type != TrackApplication) {
//记录rtp ext类型与id的关系,方便接收或发送rtp时修改rtp ext id //记录rtp ext类型与id的关系,方便接收或发送rtp时修改rtp ext id
track->rtp_ext_ctx = std::make_shared<RtpExtContext>(*m_offer); track->rtp_ext_ctx = std::make_shared<RtpExtContext>(*m_offer);
track->rtp_ext_ctx->setOnGetRtp([this, track](uint8_t pt, uint32_t ssrc, const string &rid) { track->rtp_ext_ctx->setOnGetRtp([this, &track](uint8_t pt, uint32_t ssrc, const string &rid) {
//ssrc --> MediaTrack //ssrc --> MediaTrack
_ssrc_to_track[ssrc] = track; _ssrc_to_track[ssrc] = track;
InfoL << "get rtp, pt:" << (int) pt << ", ssrc:" << ssrc << ", rid:" << rid; InfoL << "get rtp, pt:" << (int) pt << ", ssrc:" << ssrc << ", rid:" << rid;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论