Commit bec3479f authored by panxiaochun's avatar panxiaochun

fix the problem:repeatedly stop cause app crash

parent f888f471
...@@ -129,6 +129,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;} ...@@ -129,6 +129,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
- (void)stop; - (void)stop;
{ {
if (self.running == YES) {
[super stop]; [super stop];
[videoDataOutput release]; [videoDataOutput release];
...@@ -155,6 +156,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;} ...@@ -155,6 +156,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
[self.customPreviewLayer removeFromSuperlayer]; [self.customPreviewLayer removeFromSuperlayer];
self.customPreviewLayer = nil; self.customPreviewLayer = nil;
} }
}
} }
// TODO fix // TODO fix
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment