Commit 793e7f07 authored by ananta's avatar ananta Committed by Commit bot

Ensure that the DXVA decoder for VP8 and VP9 picks up the path for the HMFT...

Ensure that the DXVA decoder for VP8 and VP9 picks up the path for the HMFT correctly on non WOW64 environments

The DXVA decoder incorrectly assumes that the ProgramW6432 environment variable exists on vanilla 32 bit Windows
OS'es which is not the case. This causes the HMFT load to fail.

Fix is to only use the DIR_PROGRAM_FILES6432 directory type for a WOW64 environment which is 32 bit chrome on a 64
bit OS. In the normal case we use the vanilla DIR_PROGRAM_FILES type.

BUG=470193

Review URL: https://codereview.chromium.org/1031263002

Cr-Commit-Position: refs/heads/master@{#322272}
parent b0266f23
......@@ -940,9 +940,16 @@ bool DXVAVideoDecodeAccelerator::InitDecoder(media::VideoCodecProfile profile) {
codec_ = media::kCodecH264;
} else if (profile == media::VP8PROFILE_ANY ||
profile == media::VP9PROFILE_ANY) {
int program_files_key = base::DIR_PROGRAM_FILES;
if (base::win::OSInfo::GetInstance()->wow64_status() ==
base::win::OSInfo::WOW64_ENABLED) {
program_files_key = base::DIR_PROGRAM_FILES6432;
}
base::FilePath dll_path;
RETURN_ON_FAILURE(PathService::Get(base::DIR_PROGRAM_FILES6432, &dll_path),
"failed to get path for DIR_PROGRAM_FILES6432", false);
RETURN_ON_FAILURE(PathService::Get(program_files_key, &dll_path),
"failed to get path for Program Files", false);
dll_path = dll_path.Append(kVPXDecoderDLLPath);
if (profile == media::VP8PROFILE_ANY) {
codec_ = media::kCodecVP8;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment