From fa62fefe9ca43f1798f71bbfd8b5a60ac4d8ae96 Mon Sep 17 00:00:00 2001 From: edgar Date: Fri, 3 Jan 2025 14:11:50 +0100 Subject: [PATCH] try_pull_sample timeout ZERO --- crates/kornia-io/src/stream/capture.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/kornia-io/src/stream/capture.rs b/crates/kornia-io/src/stream/capture.rs index c0cf3c70..93ebc317 100644 --- a/crates/kornia-io/src/stream/capture.rs +++ b/crates/kornia-io/src/stream/capture.rs @@ -55,9 +55,8 @@ impl StreamCapture { /// /// An Option containing the last captured Image or None if no image has been captured yet. pub fn grab(&self) -> Result>, StreamCaptureError> { - // NOTE: this is a blocking call with a timeout of 1ns, so it should not block the thread at all self.appsink - .try_pull_sample(gst::ClockTime::from_nseconds(1)) + .try_pull_sample(gst::ClockTime::ZERO) .map(Self::extract_image_frame) .transpose() }