[PATCH 5/5] qcap/videocapture: Initialize caps struct.

Jactry Zeng jzeng at codeweavers.com
Tue May 12 08:36:10 CDT 2020


Signed-off-by: Jactry Zeng <jzeng at codeweavers.com>
---
 dlls/qcap/v4l.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
index afc9bf2c93..449951ad53 100644
--- a/dlls/qcap/v4l.c
+++ b/dlls/qcap/v4l.c
@@ -442,6 +442,7 @@ static void fill_caps(__u32 pixelformat, __u32 width, __u32 height,
 {
     LONG depth = 24;
 
+    memset(caps, 0, sizeof(*caps));
     caps->video_info.dwBitRate = width * height * depth * max_fps;
     caps->video_info.bmiHeader.biSize = sizeof(caps->video_info.bmiHeader);
     caps->video_info.bmiHeader.biWidth = width;
-- 
2.26.2



More information about the wine-devel mailing list