Bug 1474808 - MediaPipeline set description even when there is no DOM Track r=bwc
authorNico Grunbaum
Tue, 10 Jul 2018 22:54:10 -0700
changeset 426421 64fe391550637145cda7c12f8dc3441d8af47503
parent 426420 08ffac879fd0cc4ee43a8bd88884e0ec4568ec59
child 426422 46ef7ca5a86b486b826d3bc4abcdad16aa01fb28
push id34272
push userebalazs@mozilla.com
push dateFri, 13 Jul 2018 08:51:04 +0000
treeherdermozilla-central@254564563107 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwc
bugs1474808
milestone63.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 1474808 - MediaPipeline set description even when there is no DOM Track r=bwc Early bailout was preventing mDescription from getting set in MediaPipeline::SetTransport. MozReview-Commit-ID: HIIva7R3fLe
media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
@@ -1385,25 +1385,24 @@ MediaPipelineTransmit::SetDescription()
   std::string description;
   description = mPc + "| ";
   description += mConduit->type() == MediaSessionConduit::AUDIO
                     ? "Transmit audio["
                     : "Transmit video[";
 
   if (!mDomTrack) {
     description += "no track]";
-    return;
+  } else {
+    nsString nsTrackId;
+    mDomTrack->GetId(nsTrackId);
+    std::string trackId(NS_ConvertUTF16toUTF8(nsTrackId).get());
+    description += trackId;
+    description += "]";
   }
 
-  nsString nsTrackId;
-  mDomTrack->GetId(nsTrackId);
-  std::string trackId(NS_ConvertUTF16toUTF8(nsTrackId).get());
-  description += trackId;
-  description += "]";
-
   RUN_ON_THREAD(
     mStsThread,
     WrapRunnable(RefPtr<MediaPipeline>(this),
                  &MediaPipelineTransmit::SetDescription_s,
                  description),
     NS_DISPATCH_NORMAL);
 }