Bug 995090 - Update MediaCache again when there are changes in |MediaCache::mStreams|. r=roc

This commit is contained in:
JW Wang 2014-04-22 08:37:01 -04:00
parent 851264dc76
commit 79fabcdae3

View File

@ -1552,6 +1552,11 @@ MediaCache::ReleaseStream(MediaCacheStream* aStream)
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p closed", aStream));
mStreams.RemoveElement(aStream);
// Update MediaCache again for |mStreams| is changed.
// We need to re-run Update() to ensure streams reading from the same resource
// as the removed stream get a chance to continue reading.
gMediaCache->QueueUpdate();
}
void