Upstream commit: https://webrtc.googlesource.com/src/+/df1d02d83f6c34699ff047dfc104fc30773623dc [v4l2] Ensure deviceUniqueIdUTF8 is initialized Bug: chromium:506921095 Change-Id: I66dd7d5ec700224f0e19fed2d89812806a6a6964 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/468600 Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Auto-Submit: Evan Shrubsole <eshr@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47585}
23 lines
895 B
Diff
23 lines
895 B
Diff
From: Jan-Ivar Bruaroey <jib@mozilla.com>
|
|
Date: Fri, 18 Aug 2023 13:26:37 -0500
|
|
Subject: Bug 1701809: Close dev/video* driver file descriptors after camera
|
|
access on linux. r=ng
|
|
|
|
Differential Revision: https://phabricator.services.mozilla.com/D110589
|
|
---
|
|
modules/video_capture/linux/device_info_v4l2.cc | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/modules/video_capture/linux/device_info_v4l2.cc b/modules/video_capture/linux/device_info_v4l2.cc
|
|
index 0b9c92f00c..31f5e50cec 100644
|
|
--- a/modules/video_capture/linux/device_info_v4l2.cc
|
|
+++ b/modules/video_capture/linux/device_info_v4l2.cc
|
|
@@ -330,6 +330,7 @@ int32_t DeviceInfoV4l2::CreateCapabilityMap(const char* deviceUniqueIdUTF8) {
|
|
if (ioctl(fd, VIDIOC_QUERYCAP, &cap) == 0) {
|
|
// skip devices without video capture capability
|
|
if (!IsVideoCaptureDevice(&cap)) {
|
|
+ close(fd);
|
|
continue;
|
|
}
|
|
|