Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156782
b: refs/heads/master
c: 9bedc7f
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Aug 13, 2009
1 parent 360021f commit 09a8c96
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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: 99362e1ece9f9651af1b849a01d91b9df1e0db2c
refs/heads/master: 9bedc7f7fe803c17d26b5fcf5786b50a7cf40def
15 changes: 12 additions & 3 deletions trunk/drivers/media/video/v4l2-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1081,8 +1081,10 @@ static long __video_do_ioctl(struct file *file,
/* Calls the specific handler */
if (ops->vidioc_g_std)
ret = ops->vidioc_g_std(file, fh, id);
else
else if (vfd->current_norm)
*id = vfd->current_norm;
else
ret = -EINVAL;

if (!ret)
dbgarg(cmd, "std=0x%08Lx\n", (long long unsigned)*id);
Expand Down Expand Up @@ -1553,12 +1555,19 @@ static long __video_do_ioctl(struct file *file,
break;
ret = ops->vidioc_g_parm(file, fh, p);
} else {
v4l2_std_id std = vfd->current_norm;

if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;

v4l2_video_std_frame_period(vfd->current_norm,
&p->parm.capture.timeperframe);
ret = 0;
if (ops->vidioc_g_std)
ret = ops->vidioc_g_std(file, fh, &std);
else if (std == 0)
ret = -EINVAL;
if (ret == 0)
v4l2_video_std_frame_period(std,
&p->parm.capture.timeperframe);
}

dbgarg(cmd, "type=%d\n", p->type);
Expand Down

0 comments on commit 09a8c96

Please sign in to comment.