From aaecd7408045efdd412dbdd2f1936a1a20379cdb Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Thu, 14 Oct 2021 15:10:55 +0800 Subject: [PATCH] =?UTF-8?q?rtc=20answer=20sdp=E5=AD=98=E5=9C=A8=E5=A4=9A?= =?UTF-8?q?=E4=B8=AAssrc=E6=97=B6=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E4=B8=AA=E4=B8=8D=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/WebRtcTransport.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/webrtc/WebRtcTransport.cpp b/webrtc/WebRtcTransport.cpp index f6187691..6e0f5b99 100644 --- a/webrtc/WebRtcTransport.cpp +++ b/webrtc/WebRtcTransport.cpp @@ -532,15 +532,16 @@ void WebRtcTransportImp::onCheckAnswer(RtcSession &sdp) { } //添加answer sdp的ssrc信息 m.rtp_rtx_ssrc.emplace_back(); - m.rtp_rtx_ssrc[0].ssrc = _play_src->getSsrc(m.type); - m.rtp_rtx_ssrc[0].cname = RTP_CNAME; - m.rtp_rtx_ssrc[0].label = RTP_LABEL; - m.rtp_rtx_ssrc[0].mslabel = RTP_MSLABEL; - m.rtp_rtx_ssrc[0].msid = RTP_MSID; + auto &ssrc = m.rtp_rtx_ssrc.back(); + ssrc.ssrc = _play_src->getSsrc(m.type); + ssrc.cname = RTP_CNAME; + ssrc.label = RTP_LABEL; + ssrc.mslabel = RTP_MSLABEL; + ssrc.msid = RTP_MSID; if (m.getRelatedRtxPlan(m.plan[0].pt)) { //rtx ssrc - m.rtp_rtx_ssrc[0].rtx_ssrc = m.rtp_rtx_ssrc[0].ssrc + RTX_SSRC_OFFSET; + ssrc.rtx_ssrc = ssrc.ssrc + RTX_SSRC_OFFSET; } } }