You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/07/31 09:56:17 UTC

[nuttx] branch master updated: drivers/video: Initialize flags member of query control APIs

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 2d2c3eb2cf drivers/video: Initialize flags member of query control APIs
2d2c3eb2cf is described below

commit 2d2c3eb2cf0711950198f7b835e8b8b8f3ffd65b
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Tue Jul 11 13:18:26 2023 +0900

    drivers/video: Initialize flags member of query control APIs
    
    video driver does not support flags member of ioctl(VIDIOC_QUERYCTRL)
    and ioctl(VIDIOC_QUERY_EXT_CTRL).
    But, ioctl returns with the flags member that has the garbage value.
    Add initialization of flags member to avoid return of the garbage value.
---
 drivers/video/video.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/video/video.c b/drivers/video/video.c
index b67fe7580d..92a450a16b 100644
--- a/drivers/video/video.c
+++ b/drivers/video/video.c
@@ -2157,6 +2157,7 @@ static int video_query_ext_ctrl(FAR struct video_mng_s *vmng,
       attr->maximum       = vmng->video_scence_num - 1;
       attr->step          = 1;
       attr->default_value = 0;
+      attr->flags         = 0;
       strlcpy(attr->name, "Scene Mode", 32);
     }
   else
@@ -2170,6 +2171,7 @@ static int video_query_ext_ctrl(FAR struct video_mng_s *vmng,
         }
 
       attr->type = value.type;
+      attr->flags = 0;
 
       switch (value.type)
         {