Re: Electronic-Design ANDI - xawtv debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx> writes:

> Gerd, should xawtv be protected against moronic driver programmers like
> me by checking whether nbuf is zero in mm_queue() (or maybe in
> v4l_open()) in libng/plugins/drv-v4l.c?

This way maybe?

  Gerd

--- xawtv-3.86/libng/plugins/drv1-v4l.c~	2003-02-10 15:26:02.000000000 +0100
+++ xawtv-3.86/libng/plugins/drv1-v4l.c	2003-02-11 13:16:36.000000000 +0100
@@ -951,6 +951,10 @@
 mm_setparams(struct v4l_handle *h, struct ng_video_fmt *fmt)
 {
     unsigned int i;
+
+    /* buffers available ? */
+    if (h->mbuf.frames < 1)
+	return -1;
     
     /* verify parameters */
     xioctl(h->fd,VIDIOCGCAP,&h->capability);





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux