Bug 1396974: stop bundeling inactive m-sections. r=bwc
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Fri, 08 Sep 2017 12:26:19 -0700
changeset 429983 ae71d517c443ef541b0537a1f9d4eb336e76f583
parent 429982 649a61cd93814faaf5aba92d2f1df6310209c37c
child 429984 06c3517b0f33174055a84a04e61878f7d92ce3cf
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwc
bugs1396974
milestone57.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 1396974: stop bundeling inactive m-sections. r=bwc MozReview-Commit-ID: AXBtipHlW0Y
media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
--- a/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
+++ b/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp
@@ -636,17 +636,18 @@ JsepSessionImpl::SetupBundle(Sdp* sdp) c
   std::vector<std::string> mids;
   std::set<SdpMediaSection::MediaType> observedTypes;
 
   // This has the effect of changing the bundle level if the first m-section
   // goes from disabled to enabled. This is kinda inefficient.
 
   for (size_t i = 0; i < sdp->GetMediaSectionCount(); ++i) {
     auto& attrs = sdp->GetMediaSection(i).GetAttributeList();
-    if (attrs.HasAttribute(SdpAttribute::kMidAttribute)) {
+    if ((sdp->GetMediaSection(i).GetPort() != 0) &&
+        attrs.HasAttribute(SdpAttribute::kMidAttribute)) {
       bool useBundleOnly = false;
       switch (mBundlePolicy) {
         case kBundleMaxCompat:
           // We don't use bundle-only for max-compat
           break;
         case kBundleBalanced:
           // balanced means we use bundle-only on everything but the first
           // m-section of a given type