diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-05-01 08:46:30 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-05-01 08:46:30 -0300 |
commit | bba63974e25856bdb9e0bfa00b88d8f605051fce (patch) | |
tree | 1184ab39c289ea33d753d69949ebd33a0af818a5 /linux/drivers | |
parent | 8ea8194c2465db7679f0e0cd2aa9131294eed015 (diff) | |
download | mediapointer-dvb-s2-bba63974e25856bdb9e0bfa00b88d8f605051fce.tar.gz mediapointer-dvb-s2-bba63974e25856bdb9e0bfa00b88d8f605051fce.tar.bz2 |
VIDIOCGMBUF handling in video_ioctl2()
From: Sam Revitch <sam.revitch@gmail.com>
Correct handling of VIDIOCGMBUF in video_ioctl2().
Signed-off-by: Sam Revitch <samr7@cs.washington.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/videodev.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index 0443be210..bd503c5ef 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -461,6 +461,24 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, v4l_print_ioctl(vfd->name, cmd); } +#ifdef CONFIG_VIDEO_V4L1_COMPAT + /* --- streaming capture ------------------------------------- */ + if (cmd == VIDIOCGMBUF) { + struct video_mbuf *p=arg; + + memset(p,0,sizeof(p)); + + if (!vfd->vidiocgmbuf) + return ret; + ret=vfd->vidiocgmbuf(file, fh, p); + if (!ret) + dbgarg (cmd, "size=%d, frames=%d, offsets=0x%08lx\n", + p->size, p->frames, + (unsigned long)p->offsets); + return ret; + } +#endif + if (_IOC_TYPE(cmd)=='v') return v4l_compat_translate_ioctl(inode,file,cmd,arg, __video_do_ioctl); @@ -815,24 +833,6 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, ret=vfd->vidioc_overlay(file, fh, *i); break; } -#ifdef CONFIG_VIDEO_V4L1_COMPAT - /* --- streaming capture ------------------------------------- */ - case VIDIOCGMBUF: - { - struct video_mbuf *p=arg; - - memset(p,0,sizeof(p)); - - if (!vfd->vidiocgmbuf) - break; - ret=vfd->vidiocgmbuf(file, fh, p); - if (!ret) - dbgarg (cmd, "size=%d, frames=%d, offsets=0x%08lx\n", - p->size, p->frames, - (unsigned long)p->offsets); - break; - } -#endif case VIDIOC_G_FBUF: { struct v4l2_framebuffer *p=arg; |