Skip to content

Commit

Permalink
V4L/DVB (4627): Vivi crashes with mplayer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sascha Hauer authored and Mauro Carvalho Chehab committed Sep 26, 2006
1 parent 183d896 commit d7fbefe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d7fbefe

Please sign in to comment.