From 4859fa3336a4646fbec84dfaba92e46260ffc784 Mon Sep 17 00:00:00 2001 From: yuyoyuppe Date: Fri, 12 Mar 2021 17:14:07 +0300 Subject: [PATCH] fix crashing issue when no suitable mode is found --- src/common/interop/interop.cpp | 2 +- .../VideoConferenceProxyFilter/VideoCaptureProxyFilter.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/interop/interop.cpp b/src/common/interop/interop.cpp index ccb676288c..6011842fd3 100644 --- a/src/common/interop/interop.cpp +++ b/src/common/interop/interop.cpp @@ -150,7 +150,7 @@ public for (UINT32 i = 0; i < vcdl.Count(); ++i) { auto name = gcnew String(vcdl.GetDeviceName(i).data()); - if (name != L"PowerToys VideoConference") + if (name != L"PowerToys VideoConference Mute") { names->Add(name); } diff --git a/src/modules/videoconference/VideoConferenceProxyFilter/VideoCaptureProxyFilter.cpp b/src/modules/videoconference/VideoConferenceProxyFilter/VideoCaptureProxyFilter.cpp index 3d7820ee69..a307064638 100644 --- a/src/modules/videoconference/VideoConferenceProxyFilter/VideoCaptureProxyFilter.cpp +++ b/src/modules/videoconference/VideoConferenceProxyFilter/VideoCaptureProxyFilter.cpp @@ -509,7 +509,7 @@ HRESULT VideoCaptureProxyFilter::EnumPins(IEnumPins** ppEnum) if (webcams.empty()) { LOG("No physical webcams found"); - return S_OK; + return E_FAIL; } std::optional selectedCamIdx; @@ -539,7 +539,7 @@ HRESULT VideoCaptureProxyFilter::EnumPins(IEnumPins** ppEnum) if (!selectedCamIdx) { LOG("Webcam couldn't be selected"); - return S_OK; + return E_FAIL; } auto& webcam = webcams[*selectedCamIdx];