mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
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:
parent
1beb497aa7
commit
71204f2c3b
1 changed files with 3 additions and 1 deletions
|
@ -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 =
|
||||
|
|
Loading…
Reference in a new issue