Bug 687972. Ignore closed streams when computing whether all streams for the resource are suspended. r=cpearce
authorRobert O'Callahan <robert@ocallahan.org>
Thu, 15 Dec 2011 23:26:42 +1300
changeset 84272 b4a7eba05092ed359961ee721734f4b51650b6b3
parent 84271 d46151a97b7eafeb67198cd33eff9c29488d4efe
child 84273 24bde89bd5a9f72e317ca4e105070c01d75f5777
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs687972
milestone11.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 687972. Ignore closed streams when computing whether all streams for the resource are suspended. r=cpearce
content/media/nsMediaCache.cpp
--- a/content/media/nsMediaCache.cpp
+++ b/content/media/nsMediaCache.cpp
@@ -1908,17 +1908,17 @@ nsMediaCacheStream::IsSeekable()
 }
 
 bool
 nsMediaCacheStream::AreAllStreamsForResourceSuspended(nsMediaStream** aActiveStream)
 {
   ReentrantMonitorAutoEnter mon(gMediaCache->GetReentrantMonitor());
   nsMediaCache::ResourceStreamIterator iter(mResourceID);
   while (nsMediaCacheStream* stream = iter.Next()) {
-    if (!stream->mCacheSuspended && !stream->mChannelEnded) {
+    if (!stream->mCacheSuspended && !stream->mChannelEnded && !stream->mClosed) {
       if (aActiveStream) {
         *aActiveStream = stream->mClient;
       }
       return false;
 	}
   }
   if (aActiveStream) {
     *aActiveStream = nsnull;