From 0dd0437a3727766237df82bdfa89bc02a18cc901 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 18 Feb 2009 17:28:28 +0100 Subject: zoran: set bytesperline to 0 when using MJPEG. From: Hans Verkuil Remove bogus check on bytesperline in the try_fmt_vid_out call. Just set it to 0. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/zoran/zoran_driver.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/zoran/zoran_driver.c b/linux/drivers/media/video/zoran/zoran_driver.c index eeb541f26..b4a1b1c7b 100644 --- a/linux/drivers/media/video/zoran/zoran_driver.c +++ b/linux/drivers/media/video/zoran/zoran_driver.c @@ -2550,12 +2550,11 @@ static int zoran_try_fmt_vid_out(struct file *file, void *__fh, struct zoran_jpg_settings settings; int res = 0; - if (fmt->fmt.pix.bytesperline > 0) - return -EINVAL; - if (fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG) return -EINVAL; + fmt->fmt.pix.bytesperline = 0; + mutex_lock(&zr->resource_lock); settings = fh->jpg_settings; @@ -2609,9 +2608,6 @@ static int zoran_try_fmt_vid_cap(struct file *file, void *__fh, struct zoran *zr = fh->zr; int i; - if (fmt->fmt.pix.bytesperline > 0) - return -EINVAL; - if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) return zoran_try_fmt_vid_out(file, fh, fmt); -- cgit v1.2.3