Bug 1288105 - Part 2: Fix longstanding bug where rollback could wipe out the codecs in a transceiver, that was being hidden by a bug fixed in part 1. r=mjf

Depends on D26238

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Byron Campen [:bwc] 2019-04-05 17:41:25 +00:00
parent 51a4f641d7
commit 12b283cba1

View File

@ -1548,6 +1548,8 @@ void JsepSessionImpl::RollbackLocalOffer() {
RefPtr<JsepTransceiver> temp(
new JsepTransceiver(transceiver->GetMediaType()));
temp->mSendTrack.PopulateCodecs(mSupportedCodecs);
temp->mRecvTrack.PopulateCodecs(mSupportedCodecs);
transceiver->Rollback(*temp);
}
@ -1570,6 +1572,8 @@ void JsepSessionImpl::RollbackRemoteOffer() {
// up at the starting state.
RefPtr<JsepTransceiver> temp(
new JsepTransceiver(transceiver->GetMediaType()));
temp->mSendTrack.PopulateCodecs(mSupportedCodecs);
temp->mRecvTrack.PopulateCodecs(mSupportedCodecs);
transceiver->Rollback(*temp);
if (shouldRemove) {