Bug 1011149 - Video freezes when audio track is disabled on remote stream. r=jesup, a=sledru
authorRandy Lin <rlin@mozilla.com>
Tue, 10 Jun 2014 10:32:30 +0800
changeset 207092 d586e107caa7f69bc3410fabdb3ba363a62b6b90
parent 207091 744f4ad69f423f1529eea0a55d88f109cd0dbf30
child 207093 e908afe16c31e0d6f5fc94856f76061fbe2e1559
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, sledru
bugs1011149
milestone32.0a2
Bug 1011149 - Video freezes when audio track is disabled on remote stream. r=jesup, a=sledru
content/media/AudioSegment.h
--- a/content/media/AudioSegment.h
+++ b/content/media/AudioSegment.h
@@ -183,17 +183,17 @@ public:
 #endif
 
     for (ChunkIterator ci(*this); !ci.IsEnded(); ci.Next()) {
       nsAutoTArray<nsTArray<T>, GUESS_AUDIO_CHANNELS> output;
       nsAutoTArray<const T*, GUESS_AUDIO_CHANNELS> bufferPtrs;
       AudioChunk& c = *ci;
       // If this chunk is null, don't bother resampling, just alter its duration
       if (c.IsNull()) {
-        c.mDuration *= aOutRate / aInRate;
+        c.mDuration = (c.mDuration * aOutRate) / aInRate;
         mDuration += c.mDuration;
         continue;
       }
       uint32_t channels = c.mChannelData.Length();
       MOZ_ASSERT(channels == segmentChannelCount);
       output.SetLength(channels);
       bufferPtrs.SetLength(channels);
       uint32_t inFrames = c.mDuration;