Commit bd505531 authored by Jake Kesinger's avatar Jake Kesinger

videoio: Fix for valgrind warning in icvGetPropertyCAM_V4L

https://github.com/opencv/opencv/issues/7380
parent 157a90ac
...@@ -1613,6 +1613,7 @@ static double icvGetPropertyCAM_V4L (const CvCaptureCAM_V4L* capture, ...@@ -1613,6 +1613,7 @@ static double icvGetPropertyCAM_V4L (const CvCaptureCAM_V4L* capture,
int property_id ) { int property_id ) {
{ {
v4l2_format form; v4l2_format form;
memset(&form, 0, sizeof(v4l2_format));
form.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; form.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (-1 == ioctl (capture->deviceHandle, VIDIOC_G_FMT, &form)) { if (-1 == ioctl (capture->deviceHandle, VIDIOC_G_FMT, &form)) {
/* display an error message, and return an error code */ /* display an error message, and return an error code */
......
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