Skip to content

Commit

Permalink
removed some more stray dispatch_suspend calls that should've been ca…
Browse files Browse the repository at this point in the history
…ncels
  • Loading branch information
dognotdog committed Sep 12, 2020
1 parent 3f23d43 commit 4cb1b13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PtpWebcamDalPlugin/PtpCamera.m
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ - (instancetype) initWithIcCamera: (ICCameraDevice*) camera delegate: (id <PtpCa
- (void) dealloc
{
if (frameTimerSource)
dispatch_suspend(frameTimerSource);
dispatch_source_cancel(frameTimerSource);
}

- (void) deviceDidBecomeReadyWithCompleteContentCatalog:(ICCameraDevice *)device
Expand Down
6 changes: 4 additions & 2 deletions PtpWebcamDalPlugin/PtpWebcamDummyStream.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ - (instancetype) init

- (void) dealloc
{
dispatch_suspend(frameTimerSource);
if (frameTimerSource)
dispatch_source_cancel(frameTimerSource);
}

- (OSStatus) startStream
Expand All @@ -58,7 +59,8 @@ - (OSStatus) startStream

- (OSStatus) stopStream
{
dispatch_suspend(frameTimerSource);
if (frameTimerSource)
dispatch_source_cancel(frameTimerSource);

return kCMIOHardwareNoError;
}
Expand Down
2 changes: 1 addition & 1 deletion PtpWebcamDalPlugin/PtpWebcamPtpStream.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ - (instancetype) initWithPluginInterface: (_Nonnull CMIOHardwarePlugInRef) plugi
- (void) dealloc
{
if (frameTimerSource)
dispatch_suspend(frameTimerSource);
dispatch_source_cancel(frameTimerSource);
}

- (void) startFrameTimer
Expand Down

0 comments on commit 4cb1b13

Please sign in to comment.