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}
This commit is contained in:
kjellander 2016-01-19 05:49:18 -08:00 committed by Commit bot
parent 3c85cad1d4
commit 73674f8064

View File

@ -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");