Merge pull request #7571 from panxiaochun:CvVideoCamera_stop

This commit is contained in:
Alexander Alekhin 2016-10-31 17:35:41 +00:00
commit 6c12533160
2 changed files with 26 additions and 24 deletions

View File

@ -203,11 +203,11 @@
}
[self.captureSession stopRunning];
self.captureSession = nil;
[captureSession release];
}
self.captureVideoPreviewLayer = nil;
self.videoCaptureConnection = nil;
[captureVideoPreviewLayer release];
[videoCaptureConnection release];
captureSessionLoaded = NO;
}

View File

@ -129,9 +129,10 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
- (void)stop;
{
if (self.running == YES) {
[super stop];
self.videoDataOutput = nil;
[videoDataOutput release];
if (videoDataOutputQueue) {
dispatch_release(videoDataOutputQueue);
}
@ -144,11 +145,11 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
} else {
NSLog(@"[Camera] Recording Error: asset writer status is not writing");
}
self.recordAssetWriter = nil;
[recordAssetWriter release];
}
self.recordAssetWriterInput = nil;
self.recordPixelBufferAdaptor = nil;
[recordAssetWriterInput release];
[recordPixelBufferAdaptor release];
}
if (self.customPreviewLayer) {
@ -156,6 +157,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
self.customPreviewLayer = nil;
}
}
}
// TODO fix
- (void)adjustLayoutToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;