fix ios ci test callsdpnormalization
iOS CI / Build and Test SwiftUI App (push) Canceled after 0s
Build Unsigned iOS and macOS Apps / Build Unsigned iOS IPA (push) Canceled after 0s
Build Unsigned iOS and macOS Apps / Build macOS ZIP (push) Canceled after 0s

This commit is contained in:
wt committed 2026-08-11 14:42:15 +07:00
1 parent 85c06165e8
commit 10e18eecb6
2 files changed
+52 -38

No files matched your search

+8 -7
View File
@@ -1631,18 +1631,19 @@ enum CallSDPOrdering {
}
enum CallSDPNormalization {
/// Martin 3.2.4 expects CRLF between lines and unconditionally drops the
/// final two characters of its input. Give it one, and only one, trailing
/// CRLF so the last character of an SSRC/MSID value is never discarded.
static func martinParseInput(_ webRTCSDP: String) -> String {
var normalized =
let lfNormalized =
webRTCSDP
.replacingOccurrences(of: "\r\n", with: "\n")
.replacingOccurrences(of: "\r", with: "\n")
while normalized.hasSuffix("\n") {
normalized.removeLast()
var lines = lfNormalized.components(separatedBy: "\n")
while lines.last?.isEmpty == true {
lines.removeLast()
}
return normalized.replacingOccurrences(of: "\n", with: "\r\n") + "\r\n"
return lines.joined(separator: "\r\n") + "\r\n"
}
}