diff --git a/modules/videoio/src/cap_obsensor/obsensor_stream_channel_msmf.cpp b/modules/videoio/src/cap_obsensor/obsensor_stream_channel_msmf.cpp index b9b1f05a47..5ac204e504 100644 --- a/modules/videoio/src/cap_obsensor/obsensor_stream_channel_msmf.cpp +++ b/modules/videoio/src/cap_obsensor/obsensor_stream_channel_msmf.cpp @@ -195,7 +195,7 @@ std::vector MFContext::queryUvcDeviceInfoList() std::string uid, guid; if (!parseUvcDeviceSymbolicLink(symbolicLink, vid, pid, mi, uid, guid)) continue; - uvcDevList.emplace_back(UvcDeviceInfo({ symbolicLink, name, uid, vid, pid, mi })); + uvcDevList.emplace_back(UvcDeviceInfo{ symbolicLink, name, uid, vid, pid, mi }); CV_LOG_INFO(NULL, "UVC device found: name=" << name << ", vid=" << vid << ", pid=" << pid << ", mi=" << mi << ", uid=" << uid << ", guid=" << guid); } return uvcDevList; diff --git a/modules/videoio/src/cap_obsensor/obsensor_stream_channel_v4l2.cpp b/modules/videoio/src/cap_obsensor/obsensor_stream_channel_v4l2.cpp index 14e9086922..96e78e160b 100644 --- a/modules/videoio/src/cap_obsensor/obsensor_stream_channel_v4l2.cpp +++ b/modules/videoio/src/cap_obsensor/obsensor_stream_channel_v4l2.cpp @@ -101,7 +101,7 @@ std::vector V4L2Context::queryUvcDeviceInfoList() cv::utils::fs::glob(videosDir, "*", videos, false, true); for (const auto& video : videos) { - UvcDeviceInfo uvcDev; + UvcDeviceInfo uvcDev{}; cv::String videoName = video.substr(video.find_last_of("/") + 1); char buf[PATH_MAX]; if (realpath(video.c_str(), buf) == nullptr || cv::String(buf).find("virtual") != std::string::npos) diff --git a/modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.hpp b/modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.hpp index 9bc7e1a563..dfbb36d7e7 100644 --- a/modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.hpp +++ b/modules/videoio/src/cap_obsensor/obsensor_uvc_stream_channel.hpp @@ -33,12 +33,12 @@ namespace obsensor { struct UvcDeviceInfo { - std::string id = ""; // uvc sub-device id - std::string name = ""; - std::string uid = ""; // parent usb device id - uint16_t vid = 0; - uint16_t pid = 0; - uint16_t mi = 0; // uvc interface index + std::string id; // uvc sub-device id + std::string name; + std::string uid; // parent usb device id + uint16_t vid; + uint16_t pid; + uint16_t mi; // uvc interface index }; enum StreamState