Bug 1161136: Ensure that mid is copied over before we disable answer m-sections. r=jesup

This commit is contained in:
Byron Campen [:bwc] 2015-05-04 12:02:35 -07:00
parent 3f6beea0e6
commit cc41914b23

View File

@ -1146,13 +1146,16 @@ JsepSessionImpl::CreateAnswerMSection(const JsepAnswerOptions& options,
SdpMediaSection* msection,
Sdp* sdp)
{
nsresult rv = CopyStickyParams(remoteMsection, msection);
NS_ENSURE_SUCCESS(rv, rv);
if (MsectionIsDisabled(remoteMsection)) {
DisableMsection(sdp, msection);
return NS_OK;
}
SdpSetupAttribute::Role role;
nsresult rv = DetermineAnswererSetupRole(remoteMsection, &role);
rv = DetermineAnswererSetupRole(remoteMsection, &role);
NS_ENSURE_SUCCESS(rv, rv);
rv = AddTransportAttributes(msection, role);
@ -1169,9 +1172,6 @@ JsepSessionImpl::CreateAnswerMSection(const JsepAnswerOptions& options,
msection->SetReceiving(true);
}
rv = CopyStickyParams(remoteMsection, msection);
NS_ENSURE_SUCCESS(rv, rv);
// Now add the codecs.
PtrVector<JsepCodecDescription> matchingCodecs(
GetCommonCodecs(remoteMsection));