Bug 1152093: Perform case-insensitive comparisons for codec types. r=jesup

This commit is contained in:
Byron Campen [:bwc] 2015-04-09 15:40:48 -07:00
parent 653b5b1a85
commit c4065db6bc

View File

@ -7,7 +7,9 @@
#include <iostream>
#include <string>
#include <string.h>
#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;