From a3d0d3b7ada143fdfaee6c767791f792209b5de2 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Tue, 30 Mar 2021 09:58:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=BD=E7=95=A5=E5=A4=A7=E5=B0=8F=E5=86=99?= =?UTF-8?q?=E6=8B=BC=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/Sdp.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webrtc/Sdp.cpp b/webrtc/Sdp.cpp index 9b00fd4c..e0b46367 100644 --- a/webrtc/Sdp.cpp +++ b/webrtc/Sdp.cpp @@ -259,7 +259,7 @@ void RtcSessionSdp::parse(const string &str) { } auto key = line.substr(0, 1); auto value = line.substr(2); - if (key == "m") { + if (!strcasecmp(key.data(), "m")) { medias.emplace_back(RtcSdpBase()); media = &medias.back(); } @@ -923,19 +923,19 @@ void RtcSession::loadFrom(const string &str) { for (auto &ssrc : media.getAllItem('a', "ssrc")) { auto &rtc_ssrc = rtc_ssrc_map[ssrc.ssrc]; rtc_ssrc.ssrc = ssrc.ssrc; - if (ssrc.attribute == "cname") { + if (!strcasecmp(ssrc.attribute.data(), "cname")) { rtc_ssrc.cname = ssrc.attribute_value; continue; } - if (ssrc.attribute == "msid") { + if (!strcasecmp(ssrc.attribute.data(), "msid")) { rtc_ssrc.msid = ssrc.attribute_value; continue; } - if (ssrc.attribute == "mslabel") { + if (!strcasecmp(ssrc.attribute.data(), "mslabel")) { rtc_ssrc.mslabel = ssrc.attribute_value; continue; } - if (ssrc.attribute == "label") { + if (!strcasecmp(ssrc.attribute.data(), "label")) { rtc_ssrc.label = ssrc.attribute_value; continue; }