зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1561486 - shutdown demuxer early. r=alwu
We don't need the demuxer after we've resolved the promise. Differential Revision: https://phabricator.services.mozilla.com/D36713 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b50884dcdc
Коммит
a34f058d11
|
@ -257,17 +257,12 @@ void BenchmarkPlayback::InitDecoder(UniquePtr<TrackInfo>&& aInfo) {
|
|||
void BenchmarkPlayback::FinalizeShutdown() {
|
||||
MOZ_ASSERT(OnThread());
|
||||
|
||||
MOZ_ASSERT(mFinished, "GlobalShutdown must have been run");
|
||||
MOZ_ASSERT(!mDecoder, "mDecoder must have been shutdown already");
|
||||
MOZ_ASSERT(!mDemuxer, "mDemuxer must have been shutdown already");
|
||||
MOZ_DIAGNOSTIC_ASSERT(mDecoderTaskQueue->IsEmpty());
|
||||
mDecoderTaskQueue = nullptr;
|
||||
|
||||
if (mTrackDemuxer) {
|
||||
mTrackDemuxer->Reset();
|
||||
mTrackDemuxer->BreakCycles();
|
||||
mTrackDemuxer = nullptr;
|
||||
}
|
||||
mDemuxer = nullptr;
|
||||
|
||||
RefPtr<Benchmark> ref(mGlobalState);
|
||||
ref->Thread()->Dispatch(NS_NewRunnableFunction(
|
||||
"BenchmarkPlayback::FinalizeShutdown", [ref]() { ref->Dispose(); }));
|
||||
|
@ -295,6 +290,13 @@ void BenchmarkPlayback::GlobalShutdown() {
|
|||
} else {
|
||||
FinalizeShutdown();
|
||||
}
|
||||
|
||||
if (mTrackDemuxer) {
|
||||
mTrackDemuxer->Reset();
|
||||
mTrackDemuxer->BreakCycles();
|
||||
mTrackDemuxer = nullptr;
|
||||
}
|
||||
mDemuxer = nullptr;
|
||||
}
|
||||
|
||||
void BenchmarkPlayback::Output(MediaDataDecoder::DecodedData&& aResults) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче