Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: media/gpu/dxva_video_decode_accelerator_win.cc

Issue 2669083002: Check HRESULT using macros in DXVAVideoDecodeAccelerator (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/dxva_video_decode_accelerator_win.cc
diff --git a/media/gpu/dxva_video_decode_accelerator_win.cc b/media/gpu/dxva_video_decode_accelerator_win.cc
index e154b7e2b75fc94759fbbfd61dbf84f87a50b942..84ef466cffce5bb13fde077a51fe19c3afb3e5f5 100644
--- a/media/gpu/dxva_video_decode_accelerator_win.cc
+++ b/media/gpu/dxva_video_decode_accelerator_win.cc
@@ -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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698