diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-08-06 14:10:06 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 16:53:49 +0200 |
commit | 3702627899db1d6a818c6e0b4ba5205f94bfbef4 (patch) | |
tree | e572f177b0c75afd265a1db087b24ff4f15015f0 /drivers/media/video/bt8xx | |
parent | V4L/DVB (4472): Remove debug-print from dib3000mc (diff) | |
download | linux-3702627899db1d6a818c6e0b4ba5205f94bfbef4.tar.xz linux-3702627899db1d6a818c6e0b4ba5205f94bfbef4.zip |
V4L/DVB (4474): On some cases, depth were not returned.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/bt8xx')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index 20dff7c316eb..3d7b97c661b9 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c @@ -2431,6 +2431,14 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, fbuf->bytesperline = btv->fbuf.fmt.bytesperline; if (fh->ovfmt) fbuf->depth = fh->ovfmt->depth; + else { + if (fbuf->width) + fbuf->depth = ((fbuf->bytesperline<<3) + + (fbuf->width-1) ) + /fbuf->width; + else + fbuf->depth = 0; + } return 0; } case VIDIOCSFBUF: |