conform to v4l api: buffers must be enqueued before STREAMON.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@540 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
smorlat 2009-07-16 13:12:44 +00:00
parent 5048598511
commit 582239a85c

View file

@ -235,7 +235,6 @@ static int v4l2_do_mmap(V4l2State *s){
s->frames[i]=msg;
}
s->frame_max=req.count;
/*
for (i = 0; i < s->frame_max; ++i) {
struct v4l2_buffer buf;
@ -245,9 +244,11 @@ static int v4l2_do_mmap(V4l2State *s){
buf.index = i;
if (-1==ioctl (s->fd, VIDIOC_QBUF, &buf)){
ms_error("VIDIOC_QBUF failed: %s",strerror(errno));
}else {
s->frames[i]->b_datap->db_ref++;
s->queued++;
}
}
*/
/*start capture immediately*/
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (-1 ==ioctl (s->fd, VIDIOC_STREAMON, &type)){