Skip to content

Commit dcbc216

Browse files
Junghak Sungmchehab
authored andcommitted
[media] media: videobuf2: last_buffer_queued is set at fill_v4l2_buffer()
The location in which last_buffer_queued is set is moved to fill_v4l2_buffer(). So, __vb2_perform_fileio() can use vb2_core_dqbuf() instead of vb2_internal_dqbuf(). Signed-off-by: Junghak Sung <[email protected]> Signed-off-by: Geunyoung Kim <[email protected]> Acked-by: Seung-Woo Kim <[email protected]> Acked-by: Inki Dae <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 49d8ab9 commit dcbc216

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/media/v4l2-core/videobuf2-v4l2.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,11 @@ static int __fill_v4l2_buffer(struct vb2_buffer *vb, void *pb)
270270
if (vb2_buffer_in_use(q, vb))
271271
b->flags |= V4L2_BUF_FLAG_MAPPED;
272272

273+
if (!q->is_output &&
274+
b->flags & V4L2_BUF_FLAG_DONE &&
275+
b->flags & V4L2_BUF_FLAG_LAST)
276+
q->last_buffer_dequeued = true;
277+
273278
return 0;
274279
}
275280

@@ -617,10 +622,6 @@ static int vb2_internal_dqbuf(struct vb2_queue *q, struct v4l2_buffer *b,
617622

618623
ret = vb2_core_dqbuf(q, b, nonblocking);
619624

620-
if (!ret && !q->is_output &&
621-
b->flags & V4L2_BUF_FLAG_LAST)
622-
q->last_buffer_dequeued = true;
623-
624625
return ret;
625626
}
626627

0 commit comments

Comments
 (0)