-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
use scrap::*;
fn main() {
for i in 1..100 {
let display = Display::primary()?;
Capturer::new(display)?;
}
}
Not that anyone would want to initialise the Capturer several times (I stumbled on this by accident) but I think this is caused by this:
After this call returns, the stream is stopped. When the stream stops, its callback is called
with a status of kCGDisplayStreamFrameStatusStopped. You must wait until this callback is
received before releasing the display stream object.
https://github.com/quadrupleslap/scrap/blob/master/src/quartz/capturer.rs#L75
I tried keeping a pointer reference and moving
CFRelease(self.stream);
dispatch_release(self.queue);
in the handler but it still sigsegv
I guess we would need to wait for the handler to be over inside drop
Metadata
Metadata
Assignees
Labels
No labels