mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
v4l2: request 0 buffers when stopping
Without this stopping the pool in *_set_caps() is useless. S_FMT will still fail with EBUSY. https://bugzilla.gnome.org/show_bug.cgi?id=699835
This commit is contained in:
parent
8ca4a47cdc
commit
113b60935a
1 changed files with 13 additions and 0 deletions
|
@ -582,6 +582,19 @@ gst_v4l2_buffer_pool_stop (GstBufferPool * bpool)
|
||||||
g_free (pool->buffers);
|
g_free (pool->buffers);
|
||||||
pool->buffers = NULL;
|
pool->buffers = NULL;
|
||||||
|
|
||||||
|
if (pool->num_buffers > 0) {
|
||||||
|
struct v4l2_requestbuffers breq;
|
||||||
|
memset (&breq, 0, sizeof (struct v4l2_requestbuffers));
|
||||||
|
breq.type = obj->type;
|
||||||
|
breq.count = 0;
|
||||||
|
breq.memory = V4L2_MEMORY_MMAP;
|
||||||
|
if (v4l2_ioctl (pool->video_fd, VIDIOC_REQBUFS, &breq) < 0) {
|
||||||
|
GST_ERROR_OBJECT (pool, "error releasing buffers: %s",
|
||||||
|
g_strerror (errno));
|
||||||
|
}
|
||||||
|
pool->num_buffers = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
|
|
Loading…
Reference in a new issue