Bug 1216417 - Make sure audio output streams are created after adding an audio output. r=baku,roc
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 29 Oct 2015 13:18:38 +0800
changeset 270381 65e251b9db24
parent 270380 dd17095b6b10
child 270382 dd5adab01830
push id29612
push userkwierso@gmail.com
push dateFri, 30 Oct 2015 23:36:00 +0000
treeherdermozilla-central@1596ab6985cb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku, roc
bugs1216417
milestone45.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 1216417 - Make sure audio output streams are created after adding an audio output. r=baku,roc
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);
   }