Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242101
b: refs/heads/master
c: 38a6682
h: refs/heads/master
i:
  242099: 49e37e0
v: v3
  • Loading branch information
Stephan Lachowsky authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 9fbc332 commit 0a608a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5db2c3ba4de8489a7a064bac463bb8af2c7a1ae4
refs/heads/master: 38a66824d96de8aeeb915e6f46f0d3fe55828eb1
14 changes: 9 additions & 5 deletions trunk/drivers/media/video/uvc/uvc_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,19 @@ int uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit,
static void uvc_fixup_video_ctrl(struct uvc_streaming *stream,
struct uvc_streaming_control *ctrl)
{
struct uvc_format *format;
struct uvc_format *format = NULL;
struct uvc_frame *frame = NULL;
unsigned int i;

if (ctrl->bFormatIndex <= 0 ||
ctrl->bFormatIndex > stream->nformats)
return;
for (i = 0; i < stream->nformats; ++i) {
if (stream->format[i].index == ctrl->bFormatIndex) {
format = &stream->format[i];
break;
}
}

format = &stream->format[ctrl->bFormatIndex - 1];
if (format == NULL)
return;

for (i = 0; i < format->nframes; ++i) {
if (format->frame[i].bFrameIndex == ctrl->bFrameIndex) {
Expand Down

0 comments on commit 0a608a8

Please sign in to comment.