diff options
| -rw-r--r-- | drivers/media/common/saa7146_video.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index 5ed75263340a..b8b2c551a1e2 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
| @@ -558,9 +558,11 @@ static int vidioc_s_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *f | |||
| 558 | /* ok, accept it */ | 558 | /* ok, accept it */ |
| 559 | vv->ov_fb = *fb; | 559 | vv->ov_fb = *fb; |
| 560 | vv->ov_fmt = fmt; | 560 | vv->ov_fmt = fmt; |
| 561 | if (0 == vv->ov_fb.fmt.bytesperline) | 561 | |
| 562 | vv->ov_fb.fmt.bytesperline = | 562 | if (vv->ov_fb.fmt.bytesperline < vv->ov_fb.fmt.width) { |
| 563 | vv->ov_fb.fmt.width * fmt->depth / 8; | 563 | vv->ov_fb.fmt.bytesperline = vv->ov_fb.fmt.width * fmt->depth / 8; |
| 564 | DEB_D(("setting bytesperline to %d\n", vv->ov_fb.fmt.bytesperline)); | ||
| 565 | } | ||
| 564 | 566 | ||
| 565 | mutex_unlock(&dev->lock); | 567 | mutex_unlock(&dev->lock); |
| 566 | return 0; | 568 | return 0; |
