From f0517f71653a10ffe4603af44c48009cde730b1d Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 22 May 2003 16:10:12 +0000 Subject: [PATCH] Fix for bttv driver (which doesn't seem to follow the v4l2 spec 100%? Original commit message from CVS: Fix for bttv driver (which doesn't seem to follow the v4l2 spec 100%? --- sys/v4l2/v4l2src_calls.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c index 576b6fb..9e2e93e 100644 --- a/sys/v4l2/v4l2src_calls.c +++ b/sys/v4l2/v4l2src_calls.c @@ -266,12 +266,17 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src) p.parm.capture.readbuffers = v4l2src->breq.count; ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_S_PARM, &p); + v4l2src->breq.count = p.parm.capture.readbuffers; } } + if (v4l2src->breq.count < MIN_BUFFERS_QUEUED) { + v4l2src->breq.count = MIN_BUFFERS_QUEUED; + } /* request buffer info */ v4l2src->breq.type = v4l2src->format.type; - if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_REQBUFS, &v4l2src->breq) < 0) { + if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, + VIDIOC_REQBUFS, &v4l2src->breq) < 0) { gst_element_error(GST_ELEMENT(v4l2src), "Error requesting buffers (%d) for %s: %s", v4l2src->breq.count, GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno)); -- 2.7.4