summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/zoran
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-18 13:28:28 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:42:55 -0300
commit9f1b9efa6712201aacc590b3250e6f39f9e13f21 (patch)
tree9c5494fb9084dd63a76aa7d568a845af739b119f /drivers/media/video/zoran
parent3e66793b622feb383dec59d9c044a4c908d7c5c7 (diff)
downloadlinux-9f1b9efa6712201aacc590b3250e6f39f9e13f21.tar.gz
linux-9f1b9efa6712201aacc590b3250e6f39f9e13f21.tar.bz2
linux-9f1b9efa6712201aacc590b3250e6f39f9e13f21.zip
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>
Diffstat (limited to 'drivers/media/video/zoran')
-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 90ef3ae39c1c..db9ff4a8ad85 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,
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;
@@ -2608,9 +2607,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);