Commit 2f1485c1 authored by Brian Johnson's avatar Brian Johnson Committed by Laurent Aimar

This changes range validation for control values from

value >= 0 to value >= minimum && value <= maximum
Signed-off-by: default avatarBrian Johnson <brijohn@gmail.com>
Signed-off-by: default avatarLaurent Aimar <fenrir@videolan.org>
parent 290f10bb
...@@ -2932,7 +2932,7 @@ static int Control( vlc_object_t *p_obj, int i_fd, ...@@ -2932,7 +2932,7 @@ static int Control( vlc_object_t *p_obj, int i_fd,
int i_ret = -1; int i_ret = -1;
if( i_value >= 0 ) if( i_value >= queryctrl.minimum && i_value <= queryctrl.maximum )
{ {
ext_control.value = i_value; ext_control.value = i_value;
if( v4l2_ioctl( i_fd, VIDIOC_S_EXT_CTRLS, &ext_controls ) < 0 ) if( v4l2_ioctl( i_fd, VIDIOC_S_EXT_CTRLS, &ext_controls ) < 0 )
......
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