From ff33a93245eecf776f0d03051633aba49b446646 Mon Sep 17 00:00:00 2001 From: "Byron Campen [:bwc]" Date: Thu, 9 Apr 2015 15:40:48 -0700 Subject: [PATCH] Bug 1152093: Perform case-insensitive comparisons for codec types. r=jesup --HG-- extra : rebase_source : 73d87290b942ab7dd202cbd840fd4232eff043c3 --- media/webrtc/signaling/src/jsep/JsepCodecDescription.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/media/webrtc/signaling/src/jsep/JsepCodecDescription.h b/media/webrtc/signaling/src/jsep/JsepCodecDescription.h index 4f14ddf1b261..61ba0f97bdcf 100644 --- a/media/webrtc/signaling/src/jsep/JsepCodecDescription.h +++ b/media/webrtc/signaling/src/jsep/JsepCodecDescription.h @@ -7,7 +7,9 @@ #include #include +#include #include "signaling/src/sdp/SdpMediaSection.h" +#include "nsCRT.h" namespace mozilla { @@ -77,7 +79,7 @@ struct JsepCodecDescription { const SdpRtpmapAttributeList::Rtpmap& entry = rtpmap.GetEntry(fmt); if (mType == remoteMsection.GetMediaType() - && (mName == entry.name) + && !nsCRT::strcasecmp(mName.c_str(), entry.name.c_str()) && (mClock == entry.clock) && (mChannels == entry.channels)) { return ParametersMatch(entry.pt, remoteMsection); @@ -710,7 +712,8 @@ struct JsepApplicationCodecDescription : public JsepCodecDescription { const SdpSctpmapAttributeList::Sctpmap& entry = sctpmap.GetEntry(fmt); - if (mType == remoteMsection.GetMediaType() && (mName == entry.name)) { + if (mType == remoteMsection.GetMediaType() && + !nsCRT::strcasecmp(mName.c_str(), entry.name.c_str())) { return true; } return false;