v4l2bufferpoool: Fix requeueue after seek when importing

When the buffer pool is importing buffer, it will requeue num_allocated on
streamon. As this value was not set for DMABuf import and USERPTR, no buffer
was queued  back.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/651>
This commit is contained in:
Nicolas Dufresne 2020-06-26 16:43:37 -04:00 committed by GStreamer Merge Bot
parent 1beb497aa7
commit 71204f2c3b

View file

@ -830,6 +830,7 @@ gst_v4l2_buffer_pool_start (GstBufferPool * bpool)
count = gst_v4l2_allocator_start (pool->vallocator, min_buffers,
V4L2_MEMORY_USERPTR);
pool->num_allocated = count;
/* There is no rational to not get what we asked */
if (count < min_buffers) {
@ -850,6 +851,7 @@ gst_v4l2_buffer_pool_start (GstBufferPool * bpool)
count = gst_v4l2_allocator_start (pool->vallocator, min_buffers,
V4L2_MEMORY_DMABUF);
pool->num_allocated = count;
/* There is no rational to not get what we asked */
if (count < min_buffers) {
@ -891,7 +893,7 @@ gst_v4l2_buffer_pool_start (GstBufferPool * bpool)
goto start_failed;
if (!V4L2_TYPE_IS_OUTPUT (obj->type)) {
if (g_atomic_int_get (&pool->num_queued) < min_buffers)
if (g_atomic_int_get (&pool->num_queued) < pool->num_allocated)
goto queue_failed;
pool->group_released_handler =