sdp: ignore legacy sctpmap line
and reorganise the parsing Bug: None Change-Id: I21f08297429a0cc0265da00daa681d934fc43d66 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196643 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32843}
This commit is contained in:

committed by
Commit Bot

parent
ce42cbeba8
commit
4793e9e3ce
@ -3128,8 +3128,11 @@ bool ParseContent(const std::string& message,
|
|||||||
if (!ParseDtlsSetup(line, &(transport->connection_role), error)) {
|
if (!ParseDtlsSetup(line, &(transport->connection_role), error)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else if (cricket::IsDtlsSctp(protocol) &&
|
} else if (cricket::IsDtlsSctp(protocol)) {
|
||||||
HasAttribute(line, kAttributeSctpPort)) {
|
//
|
||||||
|
// SCTP specific attributes
|
||||||
|
//
|
||||||
|
if (HasAttribute(line, kAttributeSctpPort)) {
|
||||||
if (media_type != cricket::MEDIA_TYPE_DATA) {
|
if (media_type != cricket::MEDIA_TYPE_DATA) {
|
||||||
return ParseFailed(
|
return ParseFailed(
|
||||||
line, "sctp-port attribute found in non-data media description.",
|
line, "sctp-port attribute found in non-data media description.",
|
||||||
@ -3144,8 +3147,7 @@ bool ParseContent(const std::string& message,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
media_desc->as_sctp()->set_port(sctp_port);
|
media_desc->as_sctp()->set_port(sctp_port);
|
||||||
} else if (cricket::IsDtlsSctp(protocol) &&
|
} else if (HasAttribute(line, kAttributeMaxMessageSize)) {
|
||||||
HasAttribute(line, kAttributeMaxMessageSize)) {
|
|
||||||
if (media_type != cricket::MEDIA_TYPE_DATA) {
|
if (media_type != cricket::MEDIA_TYPE_DATA) {
|
||||||
return ParseFailed(
|
return ParseFailed(
|
||||||
line,
|
line,
|
||||||
@ -3157,9 +3159,13 @@ bool ParseContent(const std::string& message,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
media_desc->as_sctp()->set_max_message_size(max_message_size);
|
media_desc->as_sctp()->set_max_message_size(max_message_size);
|
||||||
|
} else if (HasAttribute(line, kAttributeSctpmap)) {
|
||||||
|
// Ignore a=sctpmap: from early versions of draft-ietf-mmusic-sctp-sdp
|
||||||
|
continue;
|
||||||
|
}
|
||||||
} else if (cricket::IsRtpProtocol(protocol)) {
|
} else if (cricket::IsRtpProtocol(protocol)) {
|
||||||
//
|
//
|
||||||
// RTP specific attrubtes
|
// RTP specific attributes
|
||||||
//
|
//
|
||||||
if (HasAttribute(line, kAttributeRtcpMux)) {
|
if (HasAttribute(line, kAttributeRtcpMux)) {
|
||||||
media_desc->set_rtcp_mux(true);
|
media_desc->set_rtcp_mux(true);
|
||||||
|
Reference in New Issue
Block a user