зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1195625 - Use correct TaskQueue in SharedDecoderManager and H264Converter promise. r=jya
--HG-- extra : rebase_source : 6fb73739441e9236b268d6b3d085233643d4fcde
This commit is contained in:
Родитель
7c28dff629
Коммит
3e563b5168
|
@ -187,11 +187,8 @@ SharedDecoderManager::InitDecoder()
|
|||
nsRefPtr<SharedDecoderManager> self = this;
|
||||
nsRefPtr<MediaDataDecoder::InitPromise> p = mDecoderInitPromise.Ensure(__func__);
|
||||
|
||||
// The mTaskQueue is flushable which can't be used in MediaPromise. So we get
|
||||
// the current AbstractThread instead of it. The MOZ_ASSERT above ensures
|
||||
// we are running in AbstractThread so we won't get a nullptr.
|
||||
mDecoderInitPromiseRequest.Begin(
|
||||
mDecoder->Init()->Then(AbstractThread::GetCurrent(), __func__,
|
||||
mDecoder->Init()->Then(AbstractThread::GetCurrent()->AsTaskQueue(), __func__,
|
||||
[self] (TrackInfo::TrackType aType) -> void {
|
||||
self->mDecoderInitPromiseRequest.Complete();
|
||||
self->mInit = true;
|
||||
|
|
|
@ -168,11 +168,8 @@ H264Converter::CreateDecoderAndInit(MediaRawData* aSample)
|
|||
|
||||
nsRefPtr<H264Converter> self = this;
|
||||
|
||||
// The mVideoTaskQueue is flushable which can't be used in MediaPromise. So
|
||||
// we get the current AbstractThread instead of it. The MOZ_ASSERT above
|
||||
// ensures we are running in AbstractThread so we won't get a nullptr.
|
||||
mInitPromiseRequest.Begin(mDecoder->Init()
|
||||
->Then(AbstractThread::GetCurrent(), __func__, this,
|
||||
->Then(AbstractThread::GetCurrent()->AsTaskQueue(), __func__, this,
|
||||
&H264Converter::OnDecoderInitDone,
|
||||
&H264Converter::OnDecoderInitFailed));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче