From bfdfdb7a85dae02fac5ac3f7c7bce5ea112d95ca Mon Sep 17 00:00:00 2001 From: Beyley Cardellio Date: Fri, 13 Feb 2026 01:46:23 -0500 Subject: [PATCH] d/uvc: Mark stream as not running before locking event waiting Fixes a race condition on exit Part-of: --- src/xrt/drivers/uvc/uvc_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrt/drivers/uvc/uvc_driver.c b/src/xrt/drivers/uvc/uvc_driver.c index f5d9f3b7d..166ed2b55 100644 --- a/src/xrt/drivers/uvc/uvc_driver.c +++ b/src/xrt/drivers/uvc/uvc_driver.c @@ -381,8 +381,8 @@ uvc_fs_stream_stop(struct xrt_fs *xfs) strerror(errno)); } - libusb_lock_event_waiters(stream->usb_ctx); stream->is_running = false; + libusb_lock_event_waiters(stream->usb_ctx); // Wait for active transfers to finish while (stream->active_transfers > 0) {