Bug 1216417 - Make sure audio output streams are created after adding an audio output. r=baku, r=roc, a=ritu
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 29 Oct 2015 13:18:38 +0800
changeset 305386 7daa3893eab7e297fa64e619cf0738e6fbd392d7
parent 305385 1cfd7b285723fedae6acf0460f6a5303b73ba7a8
child 305387 ae4965be0983ef9f2655c3cec4b8b2dbe155cb22
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku, roc, ritu
bugs1216417
milestone44.0a2
Bug 1216417 - Make sure audio output streams are created after adding an audio output. r=baku, r=roc, a=ritu
dom/media/MediaStreamGraph.cpp
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -575,17 +575,18 @@ MediaStreamGraphImpl::CreateOrDestroyAud
 {
   MOZ_ASSERT(mRealtime, "Should only attempt to create audio streams in real-time mode");
 
   if (aStream->mAudioOutputs.IsEmpty()) {
     aStream->mAudioOutputStreams.Clear();
     return;
   }
 
-  if (!aStream->GetStreamBuffer().GetAndResetTracksDirty()) {
+  if (!aStream->GetStreamBuffer().GetAndResetTracksDirty() &&
+      !aStream->mAudioOutputStreams.IsEmpty()) {
     return;
   }
 
   nsAutoTArray<bool,2> audioOutputStreamsFound;
   for (uint32_t i = 0; i < aStream->mAudioOutputStreams.Length(); ++i) {
     audioOutputStreamsFound.AppendElement(false);
   }