зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1484783 - Ensure to read the default stride when hardware acceleration isn't usable. r=mattwoodrow
On some platforms where a hardware decoder is present, but non functioning, we would fail to initialize the video stride, leading to the frames being incorrectly displayed later. Also delete the DXVA2 manager early under those circumstances Differential Revision: https://phabricator.services.mozilla.com/D5402 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ec147a2dea
Коммит
1e194027cb
|
@ -637,7 +637,6 @@ WMFVideoMFTManager::InitInternal()
|
|||
if (SUCCEEDED(hr)) {
|
||||
mUseHwAccel = true;
|
||||
} else {
|
||||
DeleteOnMainThread(mDXVA2Manager);
|
||||
mDXVAFailureReason = nsPrintfCString(
|
||||
"MFT_MESSAGE_SET_D3D_MANAGER failed with code %X", hr);
|
||||
}
|
||||
|
@ -649,6 +648,12 @@ WMFVideoMFTManager::InitInternal()
|
|||
}
|
||||
|
||||
if (!mUseHwAccel) {
|
||||
if (mDXVA2Manager) {
|
||||
// Either mDXVAEnabled was set to false prior the second call to
|
||||
// InitInternal() due to CanUseDXVA() returning false, or
|
||||
// MFT_MESSAGE_SET_D3D_MANAGER failed
|
||||
DeleteOnMainThread(mDXVA2Manager);
|
||||
}
|
||||
if (mStreamType == VP9 || mStreamType == VP8) {
|
||||
return MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR,
|
||||
RESULT_DETAIL("Use VP8/9 MFT only if HW acceleration "
|
||||
|
@ -680,7 +685,7 @@ WMFVideoMFTManager::InitInternal()
|
|||
LOG("Video Decoder initialized, Using DXVA: %s",
|
||||
(mUseHwAccel ? "Yes" : "No"));
|
||||
|
||||
if (mDXVA2Manager) {
|
||||
if (mUseHwAccel) {
|
||||
hr = mDXVA2Manager->ConfigureForSize(mVideoInfo.ImageRect().width,
|
||||
mVideoInfo.ImageRect().height);
|
||||
NS_ENSURE_TRUE(SUCCEEDED(hr),
|
||||
|
|
Загрузка…
Ссылка в новой задаче