v4l2: fix buffer recycle

Only set the OUTSTANDING flag when we placed the buffer in an
io area and need to recycle it later.
When we captured a frame, put it in the queue. Then dequeue it
into the io area after recycling buffers.

Fixes #217
This commit is contained in:
Wim Taymans 2020-03-19 13:15:49 +01:00
parent 441fdb2333
commit a9b191971c
2 changed files with 23 additions and 15 deletions

View file

@ -859,6 +859,7 @@ static int impl_node_process(void *object)
b = spa_list_first(&port->queue, struct buffer, link);
spa_list_remove(&b->link);
SPA_FLAG_SET(b->flags, BUFFER_FLAG_OUTSTANDING);
spa_log_trace(this->log, NAME " %p: dequeue buffer %d", this, b->id);