From 2a80495bb96455a0d3cdaec0dc1cfccbe00143fa Mon Sep 17 00:00:00 2001 From: Michael Hunold Date: Sat, 13 Mar 2010 11:45:46 -0300 Subject: [PATCH] --- yaml --- r: 190689 b: refs/heads/master c: 84a1d9c83e3e13991b958c897b6e9d6a5e4ce76d h: refs/heads/master i: 190687: 82568903e907eb1a324fb8c35dea142f2024514a v: v3 --- [refs] | 2 +- trunk/drivers/media/common/saa7146_video.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 06cf7ef50333..9aab447c9153 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ab51bec1f852f6b858a26e745b32a79cd1a67eec +refs/heads/master: 84a1d9c83e3e13991b958c897b6e9d6a5e4ce76d diff --git a/trunk/drivers/media/common/saa7146_video.c b/trunk/drivers/media/common/saa7146_video.c index 5ed75263340a..b8b2c551a1e2 100644 --- a/trunk/drivers/media/common/saa7146_video.c +++ b/trunk/drivers/media/common/saa7146_video.c @@ -558,9 +558,11 @@ static int vidioc_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *f /* ok, accept it */ vv->ov_fb = *fb; vv->ov_fmt = fmt; - if (0 == vv->ov_fb.fmt.bytesperline) - vv->ov_fb.fmt.bytesperline = - vv->ov_fb.fmt.width * fmt->depth / 8; + + if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) { + vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8; + DEB_D(("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline)); + } mutex_unlock(&dev->lock); return 0;