l1npengtul / nokhwa

Cross Platform Rust Library for Powerful Webcam/Camera Capture
Apache License 2.0
521 stars 132 forks source link

Avoid deadlock on non-match in guid_to_frameformat. Fix for #87. #88

Closed JosephCatrambone closed 1 year ago

JosephCatrambone commented 1 year ago

Fix for issue #87 .

If guid_to_frameformat returns None, index is not updated and this spins.

Another solution might be to move index += 1 to the top of the method, which would be nice in that future 'continues' don't have to have the index += 1. Index does not appear to be used elsewhere in the block so this should be okay.

l1npengtul commented 1 year ago

Thank you for your contribution!