v4l2bufferpool: Update allocator flags

When we hit emulated formats, we disable CREATE_BUFS since libv4l2
cope very badly with it. Also clear the allocator flags so we will
never try to allocate more buffers. This fixes failure when the copy
threshold is reached as we where calling CREATE_BUFS, which lead to
libv4l2 instability.
This commit is contained in:
Nicolas Dufresne 2015-02-19 23:08:34 -05:00
parent 7dc475f141
commit dfb0ec6d4d

View file

@ -490,6 +490,10 @@ gst_v4l2_buffer_pool_set_config (GstBufferPool * bpool, GstStructure * config)
GST_WARNING_OBJECT (pool,
"libv4l2 converter detected, disabling CREATE_BUFS");
can_allocate = FALSE;
GST_OBJECT_FLAG_UNSET (pool->vallocator,
GST_V4L2_ALLOCATOR_FLAG_MMAP_CREATE_BUFS
| GST_V4L2_ALLOCATOR_FLAG_USERPTR_CREATE_BUFS
| GST_V4L2_ALLOCATOR_FLAG_DMABUF_CREATE_BUFS);
}
if (min_buffers < GST_V4L2_MIN_BUFFERS) {