Bug 1396974: stop bundeling inactive m-sections. r?bwc draft
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Fri, 08 Sep 2017 12:26:19 -0700
changeset 662699 e5bd8aa40566ae803c1b0e3d3286414341da61e1
parent 661528 6d0288c291650ab619dc4ff92cb0b60e3b6e7b3b
child 662700 7eda27ee5876b3baada9a3be5912f4edb8eba888
push id79160
push userdrno@ohlmeier.org
push dateMon, 11 Sep 2017 23:29:11 +0000
reviewersbwc
bugs1396974
milestone57.0a1
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