mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
修复sdp中没ssrc时触发的bug
This commit is contained in:
parent
8edd093d68
commit
9c552128a7
@ -841,8 +841,10 @@ void RtcSession::loadFrom(const string &str, bool check) {
|
||||
if (rtc_ssrc_map.size() > 1) {
|
||||
throw std::invalid_argument("sdp中不存在a=ssrc-group:FID字段,但是ssrc却有多个");
|
||||
}
|
||||
if (rtc_ssrc_map.size() == 1) {
|
||||
ssrc_rtp = rtc_ssrc_map.begin()->second.ssrc;
|
||||
}
|
||||
}
|
||||
for (auto &pr : rtc_ssrc_map) {
|
||||
auto &rtc_ssrc = pr.second;
|
||||
if (rtc_ssrc.ssrc == ssrc_rtp) {
|
||||
@ -982,6 +984,7 @@ string RtcSession::toRtspSdp() const{
|
||||
}
|
||||
}
|
||||
|
||||
copy.session_name = "zlmediakit rtsp stream from webrtc";
|
||||
auto sdp = copy.toRtcSessionSdp();
|
||||
toRtsp(sdp->items);
|
||||
int i = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user