diff --git a/dom/media/fmp4/MP4Decoder.cpp b/dom/media/fmp4/MP4Decoder.cpp index 126045d46506..f8af3bb0d01b 100644 --- a/dom/media/fmp4/MP4Decoder.cpp +++ b/dom/media/fmp4/MP4Decoder.cpp @@ -270,10 +270,10 @@ MP4Decoder::IsVideoAccelerated(layers::LayersBackend aBackend, nsIGlobalObject* result.AssignLiteral("Yes"); } else { result.AssignLiteral("No"); - if (failureReason.Length()) { - result.AppendLiteral("; "); - AppendUTF8toUTF16(failureReason, result); - } + } + if (failureReason.Length()) { + result.AppendLiteral("; "); + AppendUTF8toUTF16(failureReason, result); } decoder->Shutdown(); taskQueue->BeginShutdown(); diff --git a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp index b18485f42809..1c7f874960ff 100644 --- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp @@ -216,6 +216,14 @@ WMFVideoMFTManager::Init() mDXVAFailureReason.Append(d3d11Failure); } + if (success && mDXVA2Manager) { + if (mDXVA2Manager->IsD3D11()) { + mDXVAFailureReason.AssignLiteral("Using D3D11 API"); + } else { + mDXVAFailureReason.AssignLiteral("Using D3D9 API"); + } + } + return success; }