V4L/DVB (7197): bttv: Fix overlay divide error
authorRobert Fitzsimons <robfitz@273k.net>
Wed, 13 Feb 2008 19:38:11 +0000 (16:38 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 18 Feb 2008 15:18:03 +0000 (12:18 -0300)
The initial work to convert the bttv driver to V4L2 "Partial conversion
from V4L1 to V4L2" (e84619b17440ccca4e4db7583d126c4189b987e5), missed
the line which set the appropriate overlay crop structure in the newly
allocated bttv_buffer.  This then causes a divide error in the
bttv_calc_geo function.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/bt8xx/bttv-driver.c

index d9ce9a48ef591cb65ba99c139e7e4dfa171b68ee..5404fcc5276dc6f39b4fdb51ffca105dfc11167f 100644 (file)
@@ -2760,6 +2760,7 @@ static int bttv_overlay(struct file *file, void *f, unsigned int on)
        if (on) {
                fh->ov.tvnorm = btv->tvnorm;
                new = videobuf_pci_alloc(sizeof(*new));
+               new->crop = btv->crop[!!fh->do_crop].rect;
                bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new);
        } else {
                new = NULL;