Bug 1449042: Negotiate tracks even when they're not active. r=drno a=jcristau
authorByron Campen [:bwc] <docfaraday@gmail.com>
Tue, 27 Mar 2018 13:39:10 -0500
changeset 463012 df8ec314e63760ffcaf6ccef414ea4c534650fe5
parent 463011 8a0377c0d8602deeae0371630ad7065508daf667
child 463013 49d67e0e77a91e6b522985828ca9166fa8e2817f
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdrno, jcristau
bugs1449042
milestone60.0
Bug 1449042: Negotiate tracks even when they're not active. r=drno a=jcristau MozReview-Commit-ID: CBhwHgjt1gf
media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
--- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
+++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
@@ -1060,35 +1060,31 @@ JsepSessionImpl::MakeNegotiatedTransceiv
     nsresult rv = FinalizeTransport(
         remote.GetAttributeList(),
         answer.GetAttributeList(),
         transceiver->mTransport);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   transceiver->mSendTrack.SetActive(sending);
-  if (sending) {
-    transceiver->mSendTrack.Negotiate(answer, remote);
-  }
+  transceiver->mSendTrack.Negotiate(answer, remote);
 
   JsepTrack& recvTrack = transceiver->mRecvTrack;
   recvTrack.SetActive(receiving);
-  if (receiving) {
-    recvTrack.Negotiate(answer, remote);
+  recvTrack.Negotiate(answer, remote);
 
-    if (transceiver->HasBundleLevel() &&
-        recvTrack.GetSsrcs().empty() &&
-        recvTrack.GetMediaType() != SdpMediaSection::kApplication) {
-      // TODO(bug 1105005): Once we have urn:ietf:params:rtp-hdrext:sdes:mid
-      // support, we should only fire this warning if that extension was not
-      // negotiated.
-      MOZ_MTLOG(ML_ERROR, "[" << mName << "]: Bundled m-section has no ssrc "
-                          "attributes. This may cause media packets to be "
-                          "dropped.");
-    }
+  if (transceiver->HasBundleLevel() &&
+      recvTrack.GetSsrcs().empty() &&
+      recvTrack.GetMediaType() != SdpMediaSection::kApplication) {
+    // TODO(bug 1105005): Once we have urn:ietf:params:rtp-hdrext:sdes:mid
+    // support, we should only fire this warning if that extension was not
+    // negotiated.
+    MOZ_MTLOG(ML_ERROR, "[" << mName << "]: Bundled m-section has no ssrc "
+                        "attributes. This may cause media packets to be "
+                        "dropped.");
   }
 
   if (transceiver->mTransport->mComponents == 2) {
     // RTCP MUX or not.
     // TODO(bug 1095743): verify that the PTs are consistent with mux.
     MOZ_MTLOG(ML_DEBUG, "[" << mName << "]: RTCP-MUX is off");
   }