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 Apr 2, 2024
1 parent e6e9608 commit 5f3f692
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 5f3f692

Please sign in to comment.