зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1401147 - part1 : empty track buffer content upon detach. r=jya
After detached the source buffer, we would reset all its resource and shutdown demuxer. MozReview-Commit-ID: 7xEJ7q00aeF --HG-- extra : rebase_source : c80ebb2e9ed6c9d3a672273d20ba2558b289e92d
This commit is contained in:
Родитель
78398e9066
Коммит
a47673b6ea
|
@ -211,6 +211,9 @@ TrackBuffersManager::ProcessTasks()
|
|||
mTaskQueue = nullptr;
|
||||
MOZ_DIAGNOSTIC_ASSERT(mQueue.Length() == 0,
|
||||
"Detach task must be the last");
|
||||
mVideoTracks.Reset();
|
||||
mAudioTracks.Reset();
|
||||
ShutdownDemuxers();
|
||||
return;
|
||||
default:
|
||||
NS_WARNING("Invalid Task");
|
||||
|
|
|
@ -376,10 +376,22 @@ private:
|
|||
mLastFrameDuration.reset();
|
||||
mHighestEndTimestamp.reset();
|
||||
mNeedRandomAccessPoint = true;
|
||||
|
||||
mNextInsertionIndex.reset();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ResetAppendState();
|
||||
mEvictionIndex.Reset();
|
||||
for (auto& buffer : mBuffers) {
|
||||
buffer.Clear();
|
||||
}
|
||||
mSizeBuffer = 0;
|
||||
mNextGetSampleIndex.reset();
|
||||
mBufferedRanges.Clear();
|
||||
mSanitizedBufferedRanges.Clear();
|
||||
}
|
||||
|
||||
void AddSizeOfResources(MediaSourceDecoder::ResourceSizes* aSizes) const;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче