Commit 8ac8c0c5 authored by braveyao's avatar braveyao Committed by Commit Bot

VideoCaptureDeviceFactoryWin: stop running ComThread before destroying itself

We suspect the problem in issue879672 is caused when ComThread callback
for UWP device enumeration happens after VideoCaptureDeviceFactoryWin
instance is destroyed.
This cl is to try to stop running ComThread for UWP enumeration in the
dtor.

Bug: 879672
Change-Id: I622ff15815a0844833f87a5ba5390fc7c0e5ebd1
Reviewed-on: https://chromium-review.googlesource.com/1200465Reviewed-by: default avatarChristian Fremerey <chfremer@chromium.org>
Commit-Queue: Weiyong Yao <braveyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588224}
parent 1375b6e1
......@@ -373,7 +373,11 @@ VideoCaptureDeviceFactoryWin::VideoCaptureDeviceFactoryWin()
}
}
VideoCaptureDeviceFactoryWin::~VideoCaptureDeviceFactoryWin() = default;
VideoCaptureDeviceFactoryWin::~VideoCaptureDeviceFactoryWin() {
if (com_thread_.IsRunning()) {
com_thread_.Stop();
}
}
std::unique_ptr<VideoCaptureDevice> VideoCaptureDeviceFactoryWin::CreateDevice(
const Descriptor& device_descriptor) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment