diff --git a/modules/video_capture/windows/device_info_ds.cc b/modules/video_capture/windows/device_info_ds.cc index 935d12562d..3c25f76075 100644 --- a/modules/video_capture/windows/device_info_ds.cc +++ b/modules/video_capture/windows/device_info_ds.cc @@ -370,7 +370,7 @@ int32_t DeviceInfoDS::CreateCapabilityMap(const char* deviceUniqueIdUTF8) GUID preferedVideoFormat = FORMAT_VideoInfo; for (int32_t tmp = 0; tmp < count; ++tmp) { hr = streamConfig->GetStreamCaps(tmp, &pmt, reinterpret_cast(&caps)); - if (!FAILED(hr)) { + if (hr == S_OK) { if (pmt->majortype == MEDIATYPE_Video && pmt->formattype == FORMAT_VideoInfo2) { RTC_LOG(LS_INFO) << "Device support FORMAT_VideoInfo2"; @@ -399,7 +399,7 @@ int32_t DeviceInfoDS::CreateCapabilityMap(const char* deviceUniqueIdUTF8) for (int32_t tmp = 0; tmp < count; ++tmp) { hr = streamConfig->GetStreamCaps(tmp, &pmt, reinterpret_cast(&caps)); - if (FAILED(hr)) { + if (hr != S_OK) { RTC_LOG(LS_INFO) << "Failed to GetStreamCaps"; RELEASE_AND_CLEAR(videoControlConfig); RELEASE_AND_CLEAR(streamConfig); diff --git a/modules/video_capture/windows/video_capture_ds.cc b/modules/video_capture/windows/video_capture_ds.cc index ea377a3b05..e56dee81e5 100644 --- a/modules/video_capture/windows/video_capture_ds.cc +++ b/modules/video_capture/windows/video_capture_ds.cc @@ -220,7 +220,7 @@ int32_t VideoCaptureDS::SetCameraOutput( bool isDVCamera = false; hr = streamConfig->GetStreamCaps(windowsCapability.directShowCapabilityIndex, &pmt, reinterpret_cast(&caps)); - if (!FAILED(hr)) { + if (hr == S_OK) { if (pmt->formattype == FORMAT_VideoInfo2) { VIDEOINFOHEADER2* h = reinterpret_cast(pmt->pbFormat); if (capability.maxFPS > 0 && windowsCapability.supportFrameRateControl) {