双向会话时,确保收发ssrc一致

This commit is contained in:
ziyue 2021-10-16 10:51:48 +08:00
parent 85fec6da0b
commit f0e896a5e2

View File

@ -1713,6 +1713,10 @@ RETRY:
if (answer_media.direction == RtpDirection::invalid) { if (answer_media.direction == RtpDirection::invalid) {
continue; continue;
} }
if (answer_media.direction == RtpDirection::sendrecv) {
//如果是收发双向那么我们拷贝offer sdp的ssrc确保ssrc一致
answer_media.rtp_rtx_ssrc = offer_media.rtp_rtx_ssrc;
}
//添加媒体plan //添加媒体plan
answer_media.plan.emplace_back(*selected_plan); answer_media.plan.emplace_back(*selected_plan);