mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-03-16 02:50:53 +08:00
修复webrtc simulcast推流崩溃的bug
This commit is contained in:
Submodule 3rdpart/ZLToolKit updated: 36d1122f42...a827f0bdcb
@@ -436,8 +436,11 @@ void WebRtcTransportImp::onStartWebRTC() {
|
||||
if (m_offer->type != TrackApplication) {
|
||||
//记录rtp ext类型与id的关系,方便接收或发送rtp时修改rtp ext id
|
||||
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) {
|
||||
weak_ptr<MediaTrack> weak_track = track;
|
||||
track->rtp_ext_ctx->setOnGetRtp([this, weak_track](uint8_t pt, uint32_t ssrc, const string &rid) {
|
||||
//ssrc --> MediaTrack
|
||||
auto track = weak_track.lock();
|
||||
assert(track);
|
||||
_ssrc_to_track[ssrc] = track;
|
||||
InfoL << "get rtp, pt:" << (int) pt << ", ssrc:" << ssrc << ", rid:" << rid;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user