From 183bcdd8ba3be4ecd18a9fff6670d25661f3b1b2 Mon Sep 17 00:00:00 2001 From: stephematician Date: Fri, 13 Dec 2024 15:15:58 +1100 Subject: [PATCH] Revert 97dc86b and fix #607 Revert to FIFO management of dev->outbuf_list --- v4l2loopback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v4l2loopback.c b/v4l2loopback.c index 18b8f678..17a79f8d 100644 --- a/v4l2loopback.c +++ b/v4l2loopback.c @@ -1880,8 +1880,8 @@ static int vidioc_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf) case V4L2_BUF_TYPE_VIDEO_OUTPUT: spin_lock_bh(&dev->list_lock); - b = list_entry(dev->outbufs_list.prev, struct v4l2l_buffer, - list_head); + b = list_first_entry(&dev->outbufs_list, struct v4l2l_buffer, + list_head); list_move_tail(&b->list_head, &dev->outbufs_list); spin_unlock_bh(&dev->list_lock);