Skip to content

Commit

Permalink
When setting BBMetalCamera audio consumer, if can not add audio outpu…
Browse files Browse the repository at this point in the history
…t, set audio consumer to nil
  • Loading branch information
Silence-GitHub committed May 13, 2019
1 parent cb35a25 commit 93d7035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BBMetalImage/BBMetalImage/BBMetalCamera.swift
Expand Up @@ -95,7 +95,7 @@ public class BBMetalCamera: NSObject {
lock.wait()
_audioConsumer = newValue
if newValue != nil {
addAudioInputAndOutput()
if !addAudioInputAndOutput() { _audioConsumer = nil }
} else {
removeAudioInputAndOutput()
}
Expand Down

0 comments on commit 93d7035

Please sign in to comment.