Fix crash on second invocation of camera when running on iOS 10 simulator (#441)
This commit is contained in:
parent
6fe07c48ae
commit
3f04dd3587
|
@ -995,6 +995,7 @@ didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL
|
||||||
|
|
||||||
- (void)setCaptureQuality:(NSString *)quality
|
- (void)setCaptureQuality:(NSString *)quality
|
||||||
{
|
{
|
||||||
|
#if !(TARGET_IPHONE_SIMULATOR)
|
||||||
if (quality) {
|
if (quality) {
|
||||||
[self.session beginConfiguration];
|
[self.session beginConfiguration];
|
||||||
if ([self.session canSetSessionPreset:quality]) {
|
if ([self.session canSetSessionPreset:quality]) {
|
||||||
|
@ -1002,6 +1003,7 @@ didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL
|
||||||
}
|
}
|
||||||
[self.session commitConfiguration];
|
[self.session commitConfiguration];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue