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 82633 b4a7eba05092ed359961ee721734f4b51650b6b3
parent 82632 d46151a97b7eafeb67198cd33eff9c29488d4efe
child 82634 24bde89bd5a9f72e317ca4e105070c01d75f5777
push id21692
push usermbrubeck@mozilla.com
push dateThu, 15 Dec 2011 18:25:46 +0000
treeherdermozilla-central@63b93a89b30c [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;