зеркало из 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 : 5b012b8ace153124a1f2f158efeaad9057927dd4 extra : intermediate-source : d5219d074f525e614164e7c3076a9df695c55e6c extra : source : 8f07a48d4ac13162add83cce8677322e148d6f74
This commit is contained in:
Родитель
184fd3f455
Коммит
4ead787594
|
@ -462,7 +462,6 @@ MediaCacheStream::MediaCacheStream(ChannelMediaResource* aClient,
|
||||||
, mIsTransportSeekable(false)
|
, mIsTransportSeekable(false)
|
||||||
, mCacheSuspended(false)
|
, mCacheSuspended(false)
|
||||||
, mChannelEnded(false)
|
, mChannelEnded(false)
|
||||||
, mChannelOffset(0)
|
|
||||||
, mStreamLength(-1)
|
, mStreamLength(-1)
|
||||||
, mStreamOffset(0)
|
, mStreamOffset(0)
|
||||||
, mPlaybackBytesPerSecond(10000)
|
, mPlaybackBytesPerSecond(10000)
|
||||||
|
@ -2206,7 +2205,7 @@ MediaCacheStream::GetLength()
|
||||||
int64_t
|
int64_t
|
||||||
MediaCacheStream::GetOffset() const
|
MediaCacheStream::GetOffset() const
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
ReentrantMonitorAutoEnter mon(mMediaCache->GetReentrantMonitor());
|
||||||
return mChannelOffset;
|
return mChannelOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -460,8 +460,6 @@ private:
|
||||||
bool mCacheSuspended;
|
bool mCacheSuspended;
|
||||||
// True if the channel ended and we haven't seeked it again.
|
// True if the channel ended and we haven't seeked it again.
|
||||||
bool mChannelEnded;
|
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
|
// The reported or discovered length of the data, or -1 if nothing is
|
||||||
// known
|
// known
|
||||||
int64_t mStreamLength;
|
int64_t mStreamLength;
|
||||||
|
@ -469,6 +467,8 @@ private:
|
||||||
// The following fields are protected by the cache's monitor can can be written
|
// The following fields are protected by the cache's monitor can can be written
|
||||||
// by any thread.
|
// 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
|
// The offset where the reader is positioned in the stream
|
||||||
int64_t mStreamOffset;
|
int64_t mStreamOffset;
|
||||||
// For each block in the stream data, maps to the cache entry for the
|
// For each block in the stream data, maps to the cache entry for the
|
||||||
|
|
Загрузка…
Ссылка в новой задаче