Bug 905444 - Do not attempt that we can handle empty channels when mixing. r=roc, a=abillings
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 16 Aug 2013 10:42:50 -0400
changeset 153855 561f74e56882a28dc701d555ce2fa5000c51c1a1
parent 153854 1554a8d1eb6e09d13eee087922fc19759755f6eb
child 153856 688e49041611991e439709952c17516ce88a456b
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, abillings
bugs905444
milestone25.0a2
Bug 905444 - Do not attempt that we can handle empty channels when mixing. r=roc, a=abillings
content/media/AudioNodeStream.cpp
--- a/content/media/AudioNodeStream.cpp
+++ b/content/media/AudioNodeStream.cpp
@@ -281,17 +281,17 @@ AudioNodeStream::ObtainInputBlock(AudioC
     AudioNodeStream* a = static_cast<AudioNodeStream*>(s);
     MOZ_ASSERT(a == s->AsAudioNodeStream());
     if (a->IsFinishedOnGraphThread() ||
         a->IsAudioParamStream()) {
       continue;
     }
     AudioChunk* chunk = &a->mLastChunks[mInputs[i]->OutputNumber()];
     MOZ_ASSERT(chunk);
-    if (chunk->IsNull()) {
+    if (chunk->IsNull() || chunk->mChannelData.IsEmpty()) {
       continue;
     }
 
     inputChunks.AppendElement(chunk);
     outputChannelCount =
       GetAudioChannelsSuperset(outputChannelCount, chunk->mChannelData.Length());
   }