From 73674f80644c0e4bbf8436be8f3b8dedf959d695 Mon Sep 17 00:00:00 2001 From: kjellander Date: Tue, 19 Jan 2016 05:49:18 -0800 Subject: [PATCH] Replace hardcoded constant in video capture with macro. The roll in https://codereview.webrtc.org/1593713013 introduced a cast that is undefined behavior. The right way to fix it is to use a macro. NOTRY=True TESTED=Tommi verified that the values are the same. Review URL: https://codereview.webrtc.org/1608893003 Cr-Commit-Position: refs/heads/master@{#11302} --- webrtc/modules/video_capture/windows/video_capture_ds.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/modules/video_capture/windows/video_capture_ds.cc b/webrtc/modules/video_capture/windows/video_capture_ds.cc index dcef2d4706..fe2ca7e7d0 100644 --- a/webrtc/modules/video_capture/windows/video_capture_ds.cc +++ b/webrtc/modules/video_capture/windows/video_capture_ds.cc @@ -395,7 +395,7 @@ HRESULT VideoCaptureDS::ConnectDVCamera() hr = _graphBuilder->ConnectDirect(_outputDvPin, _inputSendPin, NULL); if (hr != S_OK) { - if (hr == (long)0x80070004) + if (hr == HRESULT_FROM_WIN32(ERROR_TOO_MANY_OPEN_FILES)) { WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, _id, "Failed to connect the capture device, busy");