diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-08-06 09:10:06 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-08-06 09:10:06 -0300 |
commit | 4faae47ad7fcefa192d328f69f76477976cf40a7 (patch) | |
tree | a65e48a01c858a0dc2f3de552135cffc9e1aff35 /linux/drivers/media/video/bt8xx | |
parent | abfdae7e6d6492977cb1784eda4a884c74541f2f (diff) | |
download | mediapointer-dvb-s2-4faae47ad7fcefa192d328f69f76477976cf40a7.tar.gz mediapointer-dvb-s2-4faae47ad7fcefa192d328f69f76477976cf40a7.tar.bz2 |
On some cases, depth were not returned.
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/bt8xx')
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-driver.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 7f75861b0..2e03d2240 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -2456,6 +2456,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: |