V4L/DVB (4627): Vivi crashes with mplayer
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 13 Sep 2006 16:26:03 +0000 (13:26 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 26 Sep 2006 15:30:36 +0000 (12:30 -0300)
The vivi.current_norm field is not initialized in vivi.c, so a
VIDIOC_G_STD ioctl without a prior call to VIDIOC_S_STD gives
unpredictable results. mplayer does exactly this.

Signed-off-by Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/vivi.c

index 06b44e1dda1d4be1786ad53f89d17a92124d7287..e7c01d560b6460f1dd6de8ab19a87ed651556782 100644 (file)
@@ -1360,6 +1360,8 @@ static int __init vivi_init(void)
        dev->vidq.timeout.data     = (unsigned long)dev;
        init_timer(&dev->vidq.timeout);
 
+       vivi.current_norm         = tvnorms[0].id;
+
        ret = video_register_device(&vivi, VFL_TYPE_GRABBER, video_nr);
        printk(KERN_INFO "Video Technology Magazine Virtual Video Capture Board (Load status: %d)\n", ret);
        return ret;