mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
webrtc sdp msid不存在时,不添加
This commit is contained in:
parent
76372cd34b
commit
b8277974aa
@ -1149,12 +1149,10 @@ RtcSessionSdp::Ptr RtcSession::toRtcSessionSdp() const{
|
|||||||
auto msid = std::make_shared<SdpAttrMsid>();
|
auto msid = std::make_shared<SdpAttrMsid>();
|
||||||
if (!m.rtp_rtx_ssrc[0].msid.empty()) {
|
if (!m.rtp_rtx_ssrc[0].msid.empty()) {
|
||||||
msid->parse(m.rtp_rtx_ssrc[0].msid);
|
msid->parse(m.rtp_rtx_ssrc[0].msid);
|
||||||
} else {
|
|
||||||
msid->parse("mslabel label");
|
|
||||||
}
|
|
||||||
sdp_media.items.emplace_back(wrapSdpAttr(std::move(msid)));
|
sdp_media.items.emplace_back(wrapSdpAttr(std::move(msid)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
for (auto &ssrc : m.rtp_rtx_ssrc) {
|
for (auto &ssrc : m.rtp_rtx_ssrc) {
|
||||||
|
@ -40,8 +40,10 @@ void WebRtcEchoTest::onCheckSdp(SdpType type, RtcSession &sdp) {
|
|||||||
if (type == SdpType::answer) {
|
if (type == SdpType::answer) {
|
||||||
for (auto &m : sdp.media) {
|
for (auto &m : sdp.media) {
|
||||||
for (auto &ssrc : m.rtp_rtx_ssrc) {
|
for (auto &ssrc : m.rtp_rtx_ssrc) {
|
||||||
|
if (!ssrc.msid.empty()) {
|
||||||
ssrc.msid = "zlmediakit msid";
|
ssrc.msid = "zlmediakit msid";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user