summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-18 17:28:28 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2009-02-18 17:28:28 +0100
commit0dd0437a3727766237df82bdfa89bc02a18cc901 (patch)
tree9c7827881452630f2c4c8116733a5a34e210a00b /linux/drivers/media
parenta393861c10e72edfaf97362739be70ebe940c246 (diff)
downloadmediapointer-dvb-s2-0dd0437a3727766237df82bdfa89bc02a18cc901.tar.gz
mediapointer-dvb-s2-0dd0437a3727766237df82bdfa89bc02a18cc901.tar.bz2
zoran: set bytesperline to 0 when using MJPEG.
From: Hans Verkuil <hverkuil@xs4all.nl> Remove bogus check on bytesperline in the try_fmt_vid_out call. Just set it to 0. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/zoran/zoran_driver.c8
1 files changed, 2 insertions, 6 deletions
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);