Commit 9f1b9efa authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 3e66793b
...@@ -2549,12 +2549,11 @@ static int zoran_try_fmt_vid_out(struct file *file, void *__fh, ...@@ -2549,12 +2549,11 @@ static int zoran_try_fmt_vid_out(struct file *file, void *__fh,
struct zoran_jpg_settings settings; struct zoran_jpg_settings settings;
int res = 0; int res = 0;
if (fmt->fmt.pix.bytesperline > 0)
return -EINVAL;
if (fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG) if (fmt->fmt.pix.pixelformat != V4L2_PIX_FMT_MJPEG)
return -EINVAL; return -EINVAL;
fmt->fmt.pix.bytesperline = 0;
mutex_lock(&zr->resource_lock); mutex_lock(&zr->resource_lock);
settings = fh->jpg_settings; settings = fh->jpg_settings;
...@@ -2608,9 +2607,6 @@ static int zoran_try_fmt_vid_cap(struct file *file, void *__fh, ...@@ -2608,9 +2607,6 @@ static int zoran_try_fmt_vid_cap(struct file *file, void *__fh,
struct zoran *zr = fh->zr; struct zoran *zr = fh->zr;
int i; int i;
if (fmt->fmt.pix.bytesperline > 0)
return -EINVAL;
if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG) if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_MJPEG)
return zoran_try_fmt_vid_out(file, fh, fmt); return zoran_try_fmt_vid_out(file, fh, fmt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment