Hello Laurent,

On Sat, 29 Sep 2007 00:16:24 +0200
Laurent Pinchart <[EMAIL PROTECTED]> wrote:
> Check that the start and length parameters given to munmap() are the same as 
> the mmap() return value and length parameter. What are their values ?

Bingo !
Address is identical, but size differs. May be bug of xawtv.

*** xawtv-3.95.orig/libng/plugins/drv0-v4l2.c   Sat Feb 12 02:56:24 2005
--- xawtv-3.95/libng/plugins/drv0-v4l2.c        Sat Sep 29 16:50:08 2007
***************
*** 768,773 ****
--- 768,774 ----
      /* get it */
      memset(&buf,0,sizeof(buf));
      buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+     buf.memory = V4L2_MEMORY_MMAP;
      if (-1 == xioctl(h->fd,VIDIOC_DQBUF,&buf, 0))
        return -1;
      h->waiton++;
***************
*** 865,871 ****
            ng_waiton_video_buf(&h->buf_me[i]);
        if (ng_debug)
            print_bufinfo(&h->buf_v4l2[i]);
!       if (-1 == munmap(h->buf_me[i].data,h->buf_me[i].size))
            perror("munmap");
      }
      h->queue = 0;
--- 866,872 ----
            ng_waiton_video_buf(&h->buf_me[i]);
        if (ng_debug)
            print_bufinfo(&h->buf_v4l2[i]);
!       if (-1 == munmap(h->buf_me[i].data,h->buf_v4l2[i].length))
            perror("munmap");
      }
      h->queue = 0;

mmap problem cleared. However still it fails at second capture.
Now it fails at select() in second capture. 
I continue tracing...

Regards,
-- 
Hirofumi Momose <[EMAIL PROTECTED]>

_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to