mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[VCM] Fix crash with NVIDIA broadcaster (#16202)
This commit is contained in:
@@ -713,6 +713,9 @@ HRESULT VideoCaptureProxyFilter::EnumPins(IEnumPins** ppEnum)
|
||||
return E_POINTER;
|
||||
}
|
||||
*ppEnum = nullptr;
|
||||
auto enumerator = winrt::make_self<ObjectEnumerator<IPin, IEnumPins>>();
|
||||
auto detached_enumerator = enumerator.detach();
|
||||
*ppEnum = detached_enumerator;
|
||||
|
||||
std::unique_lock<std::mutex> lock{ _worker_mutex };
|
||||
|
||||
@@ -801,9 +804,8 @@ HRESULT VideoCaptureProxyFilter::EnumPins(IEnumPins** ppEnum)
|
||||
}
|
||||
}
|
||||
|
||||
auto enumerator = winrt::make_self<ObjectEnumerator<IPin, IEnumPins>>();
|
||||
enumerator->_objects.emplace_back(_outPin);
|
||||
*ppEnum = enumerator.detach();
|
||||
detached_enumerator->_objects.emplace_back(_outPin);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user