aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-18 11:28:28 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:55 -0400
commit9f1b9efa6712201aacc590b3250e6f39f9e13f21 (patch)
tree9c5494fb9084dd63a76aa7d568a845af739b119f
parent3e66793b622feb383dec59d9c044a4c908d7c5c7 (diff)
V4L/DVB (10707): zoran: set bytesperline to 0 when using MJPEG.
Remove bogus check on bytesperline in the try_fmt_vid_out call. Just set it to 0. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/zoran/zoran_driver.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c
index 90ef3ae39c1..db9ff4a8ad8 100644
--- a/drivers/media/video/zoran/zoran_driver.c
+++ b/drivers/media/video/zoran/zoran_driver.c
@@ -2549,12 +2549,11 @@ static int zoran_try_fmt_vid_out(struct file *file, void *__fh,
2549 struct zoran_jpg_settings settings; 2549 struct zoran_jpg_settings settings;
2550 int res = 0; 2550 int res = 0;
2551 2551
2552 if (fmt->fmt.pix.bytesperline > 0)
2553 return -EINVAL;
2554
2555 if (fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG) 2552 if (fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG)
2556 return -EINVAL; 2553 return -EINVAL;
2557 2554
2555 fmt->fmt.pix.bytesperline = 0;
2556
2558 mutex_lock(&zr->resource_lock); 2557 mutex_lock(&zr->resource_lock);
2559 settings = fh->jpg_settings; 2558 settings = fh->jpg_settings;
2560 2559
@@ -2608,9 +2607,6 @@ static int zoran_try_fmt_vid_cap(struct file *file, void *__fh,
2608 struct zoran *zr = fh->zr; 2607 struct zoran *zr = fh->zr;
2609 int i; 2608 int i;
2610 2609
2611 if (fmt->fmt.pix.bytesperline > 0)
2612 return -EINVAL;
2613
2614 if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) 2610 if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG)
2615 return zoran_try_fmt_vid_out(file, fh, fmt); 2611 return zoran_try_fmt_vid_out(file, fh, fmt);
2616 2612