Bug 1545090 - Part 1: Don't call PeerConnectionMedia::addIceCandidate for the end-of-candidates case. r=mjf
authorByron Campen [:bwc] <docfaraday@gmail.com>
Tue, 30 Apr 2019 17:46:58 +0000
changeset 530815 05cac8b05b34bb4a181d386de9cc21cd7bd05c01
parent 530814 6fd08aa576e9e1e053d7c00cfaad88bbb2e8e17e
child 530816 80c765ccd1828d82c5ad9bd047540c8ecbe28b96
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf
bugs1545090
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1545090 - Part 1: Don't call PeerConnectionMedia::addIceCandidate for the end-of-candidates case. r=mjf Differential Revision: https://phabricator.services.mozilla.com/D28418
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -1550,17 +1550,18 @@ PeerConnectionImpl::AddIceCandidate(
   }
   JsepSession::Result result = mJsepSession->AddRemoteIceCandidate(
       aCandidate, aMid, level, aUfrag, &transportId);
 
   if (!result.mError.isSome()) {
     // We do not bother PCMedia about this before offer/answer concludes.
     // Once offer/answer concludes, PCMedia will extract these candidates from
     // the remote SDP.
-    if (mSignalingState == PCImplSignalingState::SignalingStable) {
+    if (mSignalingState == PCImplSignalingState::SignalingStable &&
+        !transportId.empty()) {
       mMedia->AddIceCandidate(aCandidate, transportId, aUfrag);
       mRawTrickledCandidates.push_back(aCandidate);
     }
     mPCObserver->OnAddIceCandidateSuccess(rv);
   } else {
     ++mAddCandidateErrorCount;
     std::string errorString = mJsepSession->GetLastError();