summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/bt8xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-08-06 09:10:06 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-08-06 09:10:06 -0300
commit4faae47ad7fcefa192d328f69f76477976cf40a7 (patch)
treea65e48a01c858a0dc2f3de552135cffc9e1aff35 /linux/drivers/media/video/bt8xx
parentabfdae7e6d6492977cb1784eda4a884c74541f2f (diff)
downloadmediapointer-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.c8
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: