Bug 1297083: Don't insert audio for GetUserMedia N times if opened N times r=pehrsons a=gchang
authorRandell Jesup <rjesup@jesup.org>
Mon, 22 Aug 2016 10:59:00 -0400
changeset 347797 e9da92c75a6933143d43fba52e57cad2a7d9246c
parent 347796 4808dc6e844f73db06db0405114d9cb1884e7bf4
child 347798 f904541591788835d6c9f229b487abdb2e11ed30
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspehrsons, gchang
bugs1297083
milestone50.0a2
Bug 1297083: Don't insert audio for GetUserMedia N times if opened N times r=pehrsons a=gchang
dom/media/webrtc/MediaEngineWebRTCAudio.cpp
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ -859,22 +859,18 @@ MediaEngineWebRTCMicrophoneSource::Proce
       }
     }
   }
 
   MonitorAutoLock lock(mMonitor);
   if (mState != kStarted)
     return;
 
-  uint32_t len = mSources.Length();
-  for (uint32_t i = 0; i < len; i++) {
-    MOZ_ASSERT(!isStereo);
-    InsertInGraph<int16_t>(audio10ms, length, 1);
-  }
-
+  MOZ_ASSERT(!isStereo);
+  InsertInGraph<int16_t>(audio10ms, length, 1);
   return;
 }
 
 void
 MediaEngineWebRTCAudioCaptureSource::GetName(nsAString &aName) const
 {
   aName.AssignLiteral("AudioCapture");
 }