Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138380
b: refs/heads/master
c: 8bbd90c
h: refs/heads/master
v: v3
  • Loading branch information
Márton Németh authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 126c830 commit 2d873a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ce566da77767bc7dd6e4016a6544c9e814d2ed3
refs/heads/master: 8bbd90ce80d39d372857235f00c7abb208bd9e4f
6 changes: 6 additions & 0 deletions trunk/drivers/media/video/uvc/uvc_v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,17 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
{
struct v4l2_fmtdesc *fmt = arg;
struct uvc_format *format;
enum v4l2_buf_type type = fmt->type;
__u32 index = fmt->index;

if (fmt->type != video->streaming->type ||
fmt->index >= video->streaming->nformats)
return -EINVAL;

memset(fmt, 0, sizeof(*fmt));
fmt->index = index;
fmt->type = type;

format = &video->streaming->format[fmt->index];
fmt->flags = 0;
if (format->flags & UVC_FMT_FLAG_COMPRESSED)
Expand Down

0 comments on commit 2d873a2

Please sign in to comment.