Ronald Bultje <[EMAIL PROTECTED]> 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);



--
video4linux-list mailing list
Unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/video4linux-list

Reply via email to