fix crashing issue when no suitable mode is found

This commit is contained in:
yuyoyuppe
2021-03-12 17:14:07 +03:00
parent 46e91337f0
commit 4859fa3336
2 changed files with 3 additions and 3 deletions

View File

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

View File

@@ -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<size_t> 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];