Dolda2000 GitWeb
/
kaka
/
cakelight.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't calculate sun colors when sun is completely up
[kaka/cakelight.git]
/
src
/
kaka
/
cakelight
/
mode
/
VideoMode.java
diff --git
a/src/kaka/cakelight/mode/VideoMode.java
b/src/kaka/cakelight/mode/VideoMode.java
index
c7985e3
..
41b599a
100644
(file)
--- a/
src/kaka/cakelight/mode/VideoMode.java
+++ b/
src/kaka/cakelight/mode/VideoMode.java
@@
-36,7
+36,9
@@
public class VideoMode extends Mode {
@Override
public void resume() {
isPaused = false;
@Override
public void resume() {
isPaused = false;
- grabberThread.notify();
+ synchronized (grabberThread) {
+ grabberThread.notify();
+ }
}
@Override
}
@Override
@@
-53,7
+55,9
@@
public class VideoMode extends Mode {
while (!isInterrupted()) {
Optional<VideoFrame> frame = grabber.grabFrame();
if (isPaused) {
while (!isInterrupted()) {
Optional<VideoFrame> frame = grabber.grabFrame();
if (isPaused) {
- wait();
+ synchronized (grabberThread) {
+ wait();
+ }
}
if (frameConsumer != null) frame.ifPresent(frameConsumer);
frame.ifPresent(VideoMode.this::onVideoFrame);
}
if (frameConsumer != null) frame.ifPresent(frameConsumer);
frame.ifPresent(VideoMode.this::onVideoFrame);