diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2009-04-30 17:03:34 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2009-04-30 17:03:34 -0700 |
commit | 574b057f4500a8ad93c3d36a72e7ba6568d15e8b (patch) | |
tree | 536347977db9d3c628a9c55fe46622495c383f72 /linux/drivers/media/video/v4l2-ioctl.c | |
parent | e7a66d6a4c0fbf91c8105ef68c07327a235d06af (diff) | |
download | mediapointer-dvb-s2-574b057f4500a8ad93c3d36a72e7ba6568d15e8b.tar.gz mediapointer-dvb-s2-574b057f4500a8ad93c3d36a72e7ba6568d15e8b.tar.bz2 |
v4l2-ioctl: Check buffer types using g_fmt instead of try_fmt
From: Trent Piepho <xyzzy@speakeasy.org>
For a number of different ioctls, the v4l2-ioctl code checks that the
passed buffer type is supported by the driver. It did this by checking
that the driver defined a method for the try_fmt handler for that buffer
type. However, try_fmt is optional and a driver might not provide it even
though it does support that type. So use g_fmt instead, since that isn't
optional.
This should fix a problem with VBI capture with saa7146.
Priority: normal
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video/v4l2-ioctl.c')
-rw-r--r-- | linux/drivers/media/video/v4l2-ioctl.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/linux/drivers/media/video/v4l2-ioctl.c b/linux/drivers/media/video/v4l2-ioctl.c index 885e6f557..e3eea7c71 100644 --- a/linux/drivers/media/video/v4l2-ioctl.c +++ b/linux/drivers/media/video/v4l2-ioctl.c @@ -545,39 +545,39 @@ static int check_fmt(const struct v4l2_ioctl_ops *ops, enum v4l2_buf_type type) switch (type) { case V4L2_BUF_TYPE_VIDEO_CAPTURE: - if (ops->vidioc_try_fmt_vid_cap) + if (ops->vidioc_g_fmt_vid_cap) return 0; break; case V4L2_BUF_TYPE_VIDEO_OVERLAY: - if (ops->vidioc_try_fmt_vid_overlay) + if (ops->vidioc_g_fmt_vid_overlay) return 0; break; case V4L2_BUF_TYPE_VIDEO_OUTPUT: - if (ops->vidioc_try_fmt_vid_out) + if (ops->vidioc_g_fmt_vid_out) return 0; break; case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: - if (ops->vidioc_try_fmt_vid_out_overlay) + if (ops->vidioc_g_fmt_vid_out_overlay) return 0; break; case V4L2_BUF_TYPE_VBI_CAPTURE: - if (ops->vidioc_try_fmt_vbi_cap) + if (ops->vidioc_g_fmt_vbi_cap) return 0; break; case V4L2_BUF_TYPE_VBI_OUTPUT: - if (ops->vidioc_try_fmt_vbi_out) + if (ops->vidioc_g_fmt_vbi_out) return 0; break; case V4L2_BUF_TYPE_SLICED_VBI_CAPTURE: - if (ops->vidioc_try_fmt_sliced_vbi_cap) + if (ops->vidioc_g_fmt_sliced_vbi_cap) return 0; break; case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT: - if (ops->vidioc_try_fmt_sliced_vbi_out) + if (ops->vidioc_g_fmt_sliced_vbi_out) return 0; break; case V4L2_BUF_TYPE_PRIVATE: - if (ops->vidioc_try_fmt_type_private) + if (ops->vidioc_g_fmt_type_private) return 0; break; } |