From c6ddc22d202b950d52ddac34aaafbde44dac48af Mon Sep 17 00:00:00 2001 From: Joseph Catrambone Date: Fri, 30 Dec 2022 20:21:38 -0800 Subject: [PATCH] Avoid deadlock on non-match in guid_to_frameformat. Fix for #87. --- nokhwa-bindings-windows/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nokhwa-bindings-windows/src/lib.rs b/nokhwa-bindings-windows/src/lib.rs index 375764f..73f9d34 100644 --- a/nokhwa-bindings-windows/src/lib.rs +++ b/nokhwa-bindings-windows/src/lib.rs @@ -639,7 +639,10 @@ pub mod wmf { let frame_fmt = match guid_to_frameformat(fourcc) { Some(fcc) => fcc, - None => continue, + None => { + index += 1; + continue; + }, }; for frame_rate in framerate_list {