зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1401471. P4 - always access mChannelOffset within the cache monitor. r=gerald
MozReview-Commit-ID: KIQU3PrBUj1 --HG-- extra : rebase_source : 8984d39f5b0b29fe3233c96e5431e8641dd918fd extra : source : 8f07a48d4ac13162add83cce8677322e148d6f74
This commit is contained in:
Родитель
105690ac8c
Коммит
eace06432d
|
@ -462,7 +462,6 @@ MediaCacheStream::MediaCacheStream(ChannelMediaResource* aClient,
|
|||
, mIsTransportSeekable(false)
|
||||
, mCacheSuspended(false)
|
||||
, mChannelEnded(false)
|
||||
, mChannelOffset(0)
|
||||
, mStreamLength(-1)
|
||||
, mStreamOffset(0)
|
||||
, mPlaybackBytesPerSecond(10000)
|
||||
|
@ -2206,7 +2205,7 @@ MediaCacheStream::GetLength()
|
|||
int64_t
|
||||
MediaCacheStream::GetOffset() const
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
ReentrantMonitorAutoEnter mon(mMediaCache->GetReentrantMonitor());
|
||||
return mChannelOffset;
|
||||
}
|
||||
|
||||
|
|
|
@ -460,8 +460,6 @@ private:
|
|||
bool mCacheSuspended;
|
||||
// True if the channel ended and we haven't seeked it again.
|
||||
bool mChannelEnded;
|
||||
// The offset where the next data from the channel will arrive
|
||||
int64_t mChannelOffset;
|
||||
// The reported or discovered length of the data, or -1 if nothing is
|
||||
// known
|
||||
int64_t mStreamLength;
|
||||
|
@ -469,6 +467,8 @@ private:
|
|||
// The following fields are protected by the cache's monitor can can be written
|
||||
// by any thread.
|
||||
|
||||
// The offset where the next data from the channel will arrive
|
||||
int64_t mChannelOffset = 0;
|
||||
// The offset where the reader is positioned in the stream
|
||||
int64_t mStreamOffset;
|
||||
// For each block in the stream data, maps to the cache entry for the
|
||||
|
|
Загрузка…
Ссылка в новой задаче