Skip to content

v4l2: Fix stall during importation

This fixes a regression in master. The importation pools are now created with 32 buffers, as a side effect the buffer pool will try to allocate 32 buffers from the downstream pool. This is a waste of memory to start with, and do lead to stalls when downstream pool cannot grow. In this context, I reused the num_allocated value to remember the targeted number of buffer and only allocate/queue that amount of buffers into the driver.

Testing this properly was racy, the second patch avoid sharing the unique v4l2 pool if not needed, and if it's active.

Fixes #754 (closed)

cc @mol

Merge request reports

Loading