Commit 5429b39d authored by jrummell's avatar jrummell Committed by Commit bot

Check HRESULT using macros in DXVAVideoDecodeAccelerator

/analyze on Windows complains about using HRESULT in a Boolean context,
so check returned values using the appropriate macro.

BUG=687394
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2669083002
Cr-Commit-Position: refs/heads/master@{#447925}
parent 96d26e24
......@@ -738,7 +738,7 @@ bool DXVAVideoDecodeAccelerator::CreateVideoProcessor() {
DXVA2_VideoProcessorCaps caps;
hr = video_processor_service_->GetVideoProcessorCaps(
guids[g], &inputDesc, D3DFMT_X8R8G8B8, &caps);
if (hr)
if (FAILED(hr))
continue;
if (!(caps.VideoProcessorOperations & DXVA2_VideoProcess_YUV2RGB))
......@@ -748,7 +748,7 @@ bool DXVAVideoDecodeAccelerator::CreateVideoProcessor() {
UINT format_count = 0;
hr = video_processor_service_->GetVideoProcessorRenderTargets(
guids[g], &inputDesc, &format_count, &formats);
if (hr)
if (FAILED(hr))
continue;
UINT f;
......@@ -763,7 +763,7 @@ bool DXVAVideoDecodeAccelerator::CreateVideoProcessor() {
// Create video processor
hr = video_processor_service_->CreateVideoProcessor(
guids[g], &inputDesc, D3DFMT_X8R8G8B8, 0, processor_.Receive());
if (hr)
if (FAILED(hr))
continue;
DXVA2_ValueRange range;
......
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