Bug 687972. Ignore closed streams when computing whether all streams for the resource are suspended. r=cpearce

This commit is contained in:
Robert O'Callahan 2011-12-15 23:26:42 +13:00
Родитель 10e6018920
Коммит 684f03fbb8
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1913,7 +1913,7 @@ nsMediaCacheStream::AreAllStreamsForResourceSuspended(nsMediaStream** aActiveStr
ReentrantMonitorAutoEnter mon(gMediaCache->GetReentrantMonitor()); ReentrantMonitorAutoEnter mon(gMediaCache->GetReentrantMonitor());
nsMediaCache::ResourceStreamIterator iter(mResourceID); nsMediaCache::ResourceStreamIterator iter(mResourceID);
while (nsMediaCacheStream* stream = iter.Next()) { while (nsMediaCacheStream* stream = iter.Next()) {
if (!stream->mCacheSuspended && !stream->mChannelEnded) { if (!stream->mCacheSuspended && !stream->mChannelEnded && !stream->mClosed) {
if (aActiveStream) { if (aActiveStream) {
*aActiveStream = stream->mClient; *aActiveStream = stream->mClient;
} }