diff options
Diffstat (limited to 'v4l2-apps/lib/libv4l/libv4l1')
-rw-r--r-- | v4l2-apps/lib/libv4l/libv4l1/libv4l1.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c b/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c index 4a54047df..40e4b2aa1 100644 --- a/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c +++ b/v4l2-apps/lib/libv4l/libv4l1/libv4l1.c @@ -454,6 +454,11 @@ int v4l1_ioctl (int fd, unsigned long int request, ...) if ((index = v4l1_get_index(fd)) == -1) return syscall(SYS_ioctl, fd, request, arg); + /* Appearantly the kernel and / or glibc ignore the 32 most significant bits + when long = 64 bits, and some applications pass an int holding the req to + ioctl, causing it to get sign extended, depending upon this behavior */ + request = (unsigned int)request; + /* do we need to take the stream lock for this ioctl? */ switch (request) { case VIDIOCSPICT: |