Bug 1247189 - part4 : ensure we always detach TBM from demuxers. r=jya

Ensure the TBM would always be detached from demuxers, before calling
TBM::detach().

MozReview-Commit-ID: DLWZHB3M3GG

--HG--
extra : rebase_source : 9e455022ba9360fb549222e9ad1238a3ae9d88ad
This commit is contained in:
Alastor Wu 2017-10-12 10:49:21 +08:00
Родитель 023e34cbe4
Коммит b4c4772190
1 изменённых файлов: 1 добавлений и 5 удалений

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

@ -579,11 +579,7 @@ SourceBuffer::HighestEndTime()
NS_IMPL_CYCLE_COLLECTION_CLASS(SourceBuffer) NS_IMPL_CYCLE_COLLECTION_CLASS(SourceBuffer)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(SourceBuffer) NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(SourceBuffer)
// Tell the TrackBuffer to end its current SourceBufferResource. tmp->Detach();
TrackBuffersManager* manager = tmp->mTrackBuffersManager;
if (manager) {
manager->Detach();
}
NS_IMPL_CYCLE_COLLECTION_UNLINK(mMediaSource) NS_IMPL_CYCLE_COLLECTION_UNLINK(mMediaSource)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mBuffered) NS_IMPL_CYCLE_COLLECTION_UNLINK(mBuffered)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED(DOMEventTargetHelper) NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED(DOMEventTargetHelper)