From f0e896a5e2cbfe3e436de4854b8c0ca5f6acf02c Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Sat, 16 Oct 2021 10:51:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8C=E5=90=91=E4=BC=9A=E8=AF=9D=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=94=B6=E5=8F=91ssrc=E4=B8=80?= =?UTF-8?q?=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/Sdp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webrtc/Sdp.cpp b/webrtc/Sdp.cpp index 115629bf..fa170e65 100644 --- a/webrtc/Sdp.cpp +++ b/webrtc/Sdp.cpp @@ -1713,6 +1713,10 @@ RETRY: if (answer_media.direction == RtpDirection::invalid) { continue; } + if (answer_media.direction == RtpDirection::sendrecv) { + //如果是收发双向,那么我们拷贝offer sdp的ssrc,确保ssrc一致 + answer_media.rtp_rtx_ssrc = offer_media.rtp_rtx_ssrc; + } //添加媒体plan answer_media.plan.emplace_back(*selected_plan);