You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/10/30 15:03:58 UTC
[incubator-nuttx] 17/22: Fix video/video.c:1458:52: error: implicit conversion from enumeration type 'enum v4l2_buf_type' to different enumeration type 'imgsensor_stream_type_t' (aka 'enum imgsensor_stream_type_e') [-Werror,-Wenum-conversion]
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 09da04d7d219dbe3590e6fa0652e9c11e644e5db
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Oct 29 18:56:48 2022 +0800
Fix video/video.c:1458:52: error: implicit conversion from enumeration type 'enum v4l2_buf_type' to different enumeration type 'imgsensor_stream_type_t' (aka 'enum imgsensor_stream_type_e') [-Werror,-Wenum-conversion]
ret = g_video_sensor_ops->validate_frame_setting(type, nr_fmt, sf, &si);
~~~~~~~~~~~~~~~~~~ ^~~~
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
drivers/video/video.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/video/video.c b/drivers/video/video.c
index 120e260d94..ce8463ece2 100644
--- a/drivers/video/video.c
+++ b/drivers/video/video.c
@@ -1455,7 +1455,8 @@ static int validate_frame_setting(enum v4l2_buf_type type,
convert_to_imgsensorfmt(&vfmt[VIDEO_FMT_SUB], &sf[IMGSENSOR_FMT_SUB]);
convert_to_imgsensorinterval(interval, &si);
- ret = g_video_sensor_ops->validate_frame_setting(type, nr_fmt, sf, &si);
+ ret = g_video_sensor_ops->validate_frame_setting(
+ type == V4L2_BUF_TYPE_STILL_CAPTURE, nr_fmt, sf, &si);
if (ret != OK)
{
return ret;