Bug 1672072 - P6. Don't attempt to create a video decoder if we don't have a KnowsCompositor set. r=mattwoodrow,bryce,mjf,padenot

Differential Revision: https://phabricator.services.mozilla.com/D96362
This commit is contained in:
Jean-Yves Avenard 2020-11-12 22:52:23 +00:00
Родитель 2ceb53bb4b
Коммит 9cc5491a92
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -247,6 +247,13 @@ RemoteDecoderManagerChild::CreateVideoDecoder(
}
MOZ_ASSERT(aLocation != RemoteDecodeIn::Unspecified);
if (!aParams.mKnowsCompositor && aLocation == RemoteDecodeIn::GpuProcess) {
// We don't have an image bridge; don't attempt to decode in the GPU
// process.
return nullptr;
}
RefPtr<RemoteVideoDecoderChild> child;
MediaResult result(NS_ERROR_DOM_MEDIA_CANCELED);