Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LLSimpleCamera.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "LLSimpleCamera"
s.version = "1.1.0"
s.version = "1.1.1"
s.summary = "LLSimpleCamera: A simple customizable camera control."
s.description = <<-DESC
LLSimpleCamera is a library for creating a customized camera screens similar to snapchat's. You don't have to present the camera in a new view controller.
Expand All @@ -15,7 +15,7 @@ hides the nitty gritty details from the developer
s.license = { :type => 'APACHE', :file => 'LICENSE' }
s.author = { "Ömer Faruk Gül" => "omer.gul@louvredigital.com" }
s.platform = :ios,'7.0'
s.source = { :git => "https://github.com/omergul123/LLSimpleCamera.git", :tag => "v1.1.0" }
s.source = { :git => "https://github.com/omergul123/LLSimpleCamera.git", :tag => "v1.1.1" }
s.source_files = 'LLSimpleCamera/*.{h,m}'
s.requires_arc = true
s.framework = 'AVFoundation'
Expand Down
13 changes: 9 additions & 4 deletions LLSimpleCamera/LLSimpleCamera.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,15 @@ - (void)changeCameraDevice:(AVCaptureDevice *)captureDevice {

// stop the camera, otherwise it will lead to memory crashes
- (void)stop {
AVCaptureInput* input = [self.session.inputs objectAtIndex:0];
[self.session removeInput:input];
AVCaptureVideoDataOutput* output = [self.session.outputs objectAtIndex:0];
[self.session removeOutput:output];
if(self.session.inputs.count > 0) {
AVCaptureInput* input = [self.session.inputs objectAtIndex:0];
[self.session removeInput:input];
}
if(self.session.outputs.count > 0) {
AVCaptureVideoDataOutput* output = [self.session.outputs objectAtIndex:0];
[self.session removeOutput:output];
}

[self.session stopRunning];
}

Expand Down