mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1138072 - Don't defer reading to a closed stream. r=roc
Other streams in the list bail out of the servicing loop if they're closed, so we can wait indefinitely.
This commit is contained in:
parent
e1d5cc2a9b
commit
903b695c08
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user