Bug 1567170 - P1. Shutdown demuxer earlier. r=decoder

If for some reason mDecoder didn't exist, we would get an assertion inside FinalizeShutdown().

Differential Revision: https://phabricator.services.mozilla.com/D41359

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jean-Yves Avenard 2019-08-12 12:04:42 +00:00
Родитель 0529daadd3
Коммит 68a6daf34d
1 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -279,6 +279,13 @@ void BenchmarkPlayback::GlobalShutdown() {
mFinished = true;
if (mTrackDemuxer) {
mTrackDemuxer->Reset();
mTrackDemuxer->BreakCycles();
mTrackDemuxer = nullptr;
}
mDemuxer = nullptr;
if (mDecoder) {
RefPtr<Benchmark> ref(mGlobalState);
mDecoder->Flush()->Then(
@ -294,13 +301,6 @@ void BenchmarkPlayback::GlobalShutdown() {
} else {
FinalizeShutdown();
}
if (mTrackDemuxer) {
mTrackDemuxer->Reset();
mTrackDemuxer->BreakCycles();
mTrackDemuxer = nullptr;
}
mDemuxer = nullptr;
}
void BenchmarkPlayback::Output(MediaDataDecoder::DecodedData&& aResults) {