Bug 1495160: Count datachannel "tracks" properly again. r=mjf
authorByron Campen [:bwc] <docfaraday@gmail.com>
Wed, 03 Oct 2018 14:07:12 +0000
changeset 495156 18725d7ee61dcefa5ccd3814b05e3e75c1bd921c
parent 495155 1c7f3cf86aed6b4476ffa66605f373b2ff74f960
child 495157 1b15bf11f650d56b2df56657994889ecedb07fa5
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf
bugs1495160
milestone64.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 1495160: Count datachannel "tracks" properly again. r=mjf Differential Revision: https://phabricator.services.mozilla.com/D7494
media/webrtc/signaling/src/jsep/JsepSession.h
--- a/media/webrtc/signaling/src/jsep/JsepSession.h
+++ b/media/webrtc/signaling/src/jsep/JsepSession.h
@@ -203,21 +203,23 @@ public:
   void
   CountTracks(uint16_t (&receiving)[SdpMediaSection::kMediaTypes],
               uint16_t (&sending)[SdpMediaSection::kMediaTypes]) const
   {
     memset(receiving, 0, sizeof(receiving));
     memset(sending, 0, sizeof(sending));
 
     for (const auto& transceiver : GetTransceivers()) {
-      if (!transceiver->mRecvTrack.GetTrackId().empty()) {
+      if (!transceiver->mRecvTrack.GetTrackId().empty() ||
+          transceiver->GetMediaType() == SdpMediaSection::kApplication) {
         receiving[transceiver->mRecvTrack.GetMediaType()]++;
       }
 
-      if (!transceiver->mSendTrack.GetTrackId().empty()) {
+      if (!transceiver->mSendTrack.GetTrackId().empty() ||
+          transceiver->GetMediaType() == SdpMediaSection::kApplication) {
         sending[transceiver->mSendTrack.GetMediaType()]++;
       }
     }
   }
 
 protected:
 
   const std::string mName;