diff --git a/dom/media/MediaCache.cpp b/dom/media/MediaCache.cpp index cd3b6ce920..065ca568d3 100644 --- a/dom/media/MediaCache.cpp +++ b/dom/media/MediaCache.cpp @@ -1173,8 +1173,10 @@ MediaCache::Update() actions.AppendElement(NONE); MediaCacheStream* stream = mStreams[i]; - if (stream->mClosed) + if (stream->mClosed) { + CACHE_LOG(PR_LOG_DEBUG, ("Stream %p closed", stream)); continue; + } // Figure out where we should be reading from. It's the first // uncached byte after the current mStreamOffset. @@ -1280,7 +1282,7 @@ MediaCache::Update() for (uint32_t j = 0; j < i; ++j) { MediaCacheStream* other = mStreams[j]; if (other->mResourceID == stream->mResourceID && - !other->mClient->IsSuspended() && + !other->mClosed && !other->mClient->IsSuspended() && other->mChannelOffset/BLOCK_SIZE == desiredOffset/BLOCK_SIZE) { // This block is already going to be read by the other stream. // So don't try to read it from this stream as well.