From 941514e27470f7621b05757dfb793337c0a0c3b0 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Thu, 5 Dec 2013 14:35:27 +0200 Subject: Make VIDIOC_[GS]_CTRL work v4l2_control.value was left uninitialised for the VIDIOC_S_CTRL IOCTL. Fix that. Signed-off-by: Sakari Ailus Signed-off-by: Laurent Pinchart --- yavta.c | 1 + 1 file changed, 1 insertion(+) (limited to 'yavta.c') diff --git a/yavta.c b/yavta.c index 480ce74..cbcf310 100644 --- a/yavta.c +++ b/yavta.c @@ -326,6 +326,7 @@ static void set_control(struct device *dev, unsigned int id, int type, struct v4l2_control old; old.id = id; + old.value = val; ret = ioctl(dev->fd, VIDIOC_S_CTRL, &old); if (ret != -1) val = old.value; -- cgit v1.2.3