diff options
Diffstat (limited to 'linux/drivers/media/video/v4l1-compat.c')
-rw-r--r-- | linux/drivers/media/video/v4l1-compat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/v4l1-compat.c b/linux/drivers/media/video/v4l1-compat.c index decf7069b..dc6f00e12 100644 --- a/linux/drivers/media/video/v4l1-compat.c +++ b/linux/drivers/media/video/v4l1-compat.c @@ -612,7 +612,9 @@ v4l_compat_translate_ioctl(struct inode *inode, break; } - pict->depth = (fmt2->fmt.pix.bytesperline/fmt2->fmt.pix.width) << 3; + pict->depth = ((fmt2->fmt.pix.bytesperline<<3) + + (fmt2->fmt.pix.width-1) ) + /fmt2->fmt.pix.width; pict->palette = pixelformat_to_palette( fmt2->fmt.pix.pixelformat); break; |