Skip to content

Commit

Permalink
Fix SIGSEGV encountered on macOS
Browse files Browse the repository at this point in the history
When attempting to close the frame grabber from a separate thread,
the application would crash due to a SIGSEGV.
  • Loading branch information
devinbileck committed Mar 27, 2024
1 parent 7d7ef01 commit 93d73b1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ public void run() {
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} finally {
try {
frameGrabber.close();
} catch (FrameGrabber.Exception ignored) {
// Don't care if this throws an exception at this point
}
close();
}
}

@Override
public void close() {
isRunning = false;
try {
frameGrabber.close();
} catch (FrameGrabber.Exception ignored) {
// Don't care if this throws an exception at this point
}
}
}

0 comments on commit 93d73b1

Please sign in to comment.