Bug 1216417 - Make sure audio output streams are created after adding an audio output. r=baku, r=roc, a=ritu, a=sylvestre
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 29 Oct 2015 13:18:38 +0800
changeset 296652 37d6cc360023
parent 296651 a54630b3ac76
child 296653 09bdeec1b65c
push id5276
push usercbook@mozilla.com
push date2015-11-09 10:31 +0000
treeherdermozilla-beta@be9dcc3b97b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku, roc, ritu, sylvestre
bugs1216417
milestone43.0
Bug 1216417 - Make sure audio output streams are created after adding an audio output. r=baku, r=roc, a=ritu, a=sylvestre
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);
   }