diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-05-22 16:10:12 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-05-22 16:10:12 +0000 |
commit | c60afcbf2ce9474a4669a932506bbb89953e3fb7 (patch) | |
tree | 87ac801101887cbb61c09254b0abcc0f8606381e /sys/v4l2/v4l2src_calls.c | |
parent | ec45be3bb68bd8c1be7a34c9a547e315071b7bf2 (diff) | |
download | gst-plugins-bad-c60afcbf2ce9474a4669a932506bbb89953e3fb7.tar.gz gst-plugins-bad-c60afcbf2ce9474a4669a932506bbb89953e3fb7.tar.bz2 gst-plugins-bad-c60afcbf2ce9474a4669a932506bbb89953e3fb7.zip |
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%?
Diffstat (limited to 'sys/v4l2/v4l2src_calls.c')
-rw-r--r-- | sys/v4l2/v4l2src_calls.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c index 576b6fbe..9e2e93e9 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)); |