This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: v4l2-utils: libv4l2: Remove unconditional sleep after STREAMOFF and enable REQBUFS(count=0) Author: Rivka S <[email protected]> Date: Wed Mar 4 12:44:23 2026 +0200 Remove the unconditional sleep(1) after VIDIOC_STREAMOFF and enable the REQBUFS(count=0) call when freeing buffers. The current implementation calls sleep(1) after STREAMOFF with a FIXME comment suggesting a need to ensure that all buffers have stopped. However, the videobuf2 implementation documents that vb2_core_streamoff() cancels the queue and removes all buffers from the driver and vb2, returning control to userspace as part of the stream stop procedure. Since STREAMOFF already performs queue cancellation, remove the additional sleep delay as is it unnecessary and does not provide deterministic synchronization. Re-enable the REQBUFS(count=0) call, which was previously disabled due to historical limitations in the old video-buf implementation. Modern buffer frameworks expect this ioctl to release all buffers as defined by the V4L2 API. Signed-off-by: Rivka S <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> utils/libv4l2util/v4l2_driver.c | 6 ------ 1 file changed, 6 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=db2ad97cd7bfb3e1060e49b83ec6836c2a49880c diff --git a/utils/libv4l2util/v4l2_driver.c b/utils/libv4l2util/v4l2_driver.c index c956032696ad..28fc1bcfeb81 100644 --- a/utils/libv4l2util/v4l2_driver.c +++ b/utils/libv4l2util/v4l2_driver.c @@ -569,17 +569,11 @@ int v4l2_free_bufs(struct v4l2_driver *drv) if (xioctl(drv->fd,VIDIOC_STREAMOFF,&drv->reqbuf.type)<0) return errno; - sleep (1); // FIXME: Should check if all buffers are stopped -/* V4L2 API says REQBUFS with count=0 should be used to release buffer. - However, video-buf.c doesn't implement it. - */ -#if 0 if (xioctl(drv->fd,VIDIOC_REQBUFS,&drv->reqbuf)<0) { perror("reqbufs while freeing buffers"); return errno; } -#endif if (drv->reqbuf.count != 0) { fprintf(stderr,"REQBUFS returned %d buffers while asking for freeing it!\n", _______________________________________________ linuxtv-commits mailing list -- [email protected] To unsubscribe send an email to [email protected]
