Bug 1508685 - Part 1: Don't pay attention to the mids in the previous answer when creating a reoffer, just use the transceiver's mid. r=mjf

Depends on D19948

Differential Revision: https://phabricator.services.mozilla.com/D19949

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Byron Campen [:bwc] 2019-02-15 18:09:17 +00:00
parent 3b7e58abef
commit 90e28addea

View File

@ -263,24 +263,18 @@ nsresult JsepSessionImpl::CreateOfferMsection(const JsepOfferOptions& options,
AddExtmap(msection);
if (lastAnswerMsection && lastAnswerMsection->GetPort()) {
MOZ_ASSERT(transceiver.IsAssociated());
MOZ_ASSERT(transceiver.GetMid() ==
lastAnswerMsection->GetAttributeList().GetMid());
std::string mid;
// We do not set the mid on the transceiver, that happens when a description
// is set.
if (transceiver.IsAssociated()) {
mid = transceiver.GetMid();
} else {
std::string mid;
// We do not set the mid on the transceiver, that happens when a description
// is set.
if (transceiver.IsAssociated()) {
mid = transceiver.GetMid();
} else {
mid = GetNewMid();
}
msection->GetAttributeList().SetAttribute(
new SdpStringAttribute(SdpAttribute::kMidAttribute, mid));
mid = GetNewMid();
}
msection->GetAttributeList().SetAttribute(
new SdpStringAttribute(SdpAttribute::kMidAttribute, mid));
return NS_OK;
}