From cc6087c58e0ad8bf7aa775e5eacedd817939dee6 Mon Sep 17 00:00:00 2001 From: Bartosz Firyn Date: Mon, 15 Jan 2018 18:15:45 +0100 Subject: [PATCH] Small fix in parallel buffer access example, refs #599 --- .../src/example/java/ParallelGetImageBytesExample.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webcam-capture/src/example/java/ParallelGetImageBytesExample.java b/webcam-capture/src/example/java/ParallelGetImageBytesExample.java index 8256d31d..b570d34d 100644 --- a/webcam-capture/src/example/java/ParallelGetImageBytesExample.java +++ b/webcam-capture/src/example/java/ParallelGetImageBytesExample.java @@ -70,9 +70,9 @@ public ByteBuffer awaitAndGet() { */ public void ready(ByteBuffer bb) { try { - exchange(bb, 0, TimeUnit.SECONDS); + exchange(bb, 500, TimeUnit.MILLISECONDS); } catch (InterruptedException | TimeoutException e) { - throw new IllegalStateException(e); + // do nothing, frame is dropped } }