diff --git a/FrameWork/Info.plist b/FrameWork/Info.plist
index 4fe33001..f4d50a8c 100644
--- a/FrameWork/Info.plist
+++ b/FrameWork/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 2.5
+ 2.6
CFBundleSignature
????
CFBundleVersion
diff --git a/LFLiveKit.podspec b/LFLiveKit.podspec
index b7a7388f..4153bc8c 100644
--- a/LFLiveKit.podspec
+++ b/LFLiveKit.podspec
@@ -2,7 +2,7 @@
Pod::Spec.new do |s|
s.name = "LFLiveKit"
- s.version = "2.5"
+ s.version = "2.6"
s.summary = "LaiFeng ios Live. LFLiveKit."
s.homepage = "https://github.com/chenliming777"
s.license = { :type => "MIT", :file => "LICENSE" }
diff --git a/LFLiveKit/capture/LFAudioCapture.m b/LFLiveKit/capture/LFAudioCapture.m
index a60f095c..bb565fa4 100755
--- a/LFLiveKit/capture/LFAudioCapture.m
+++ b/LFLiveKit/capture/LFAudioCapture.m
@@ -98,7 +98,7 @@ - (instancetype)initWithAudioConfiguration:(LFLiveAudioConfiguration *)configura
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
- dispatch_async(self.taskQueue, ^{
+ dispatch_sync(self.taskQueue, ^{
if (self.componetInstance) {
self.isRunning = NO;
AudioOutputUnitStop(self.componetInstance);
@@ -121,7 +121,7 @@ - (void)setRunning:(BOOL)running {
AudioOutputUnitStart(self.componetInstance);
});
} else {
- dispatch_async(self.taskQueue, ^{
+ dispatch_sync(self.taskQueue, ^{
self.isRunning = NO;
NSLog(@"MicrophoneSource: stopRunning");
AudioOutputUnitStop(self.componetInstance);
@@ -182,7 +182,7 @@ - (void)handleInterruption:(NSNotification *)notification {
reason = [[[notification userInfo] objectForKey:AVAudioSessionInterruptionTypeKey] integerValue];
if (reason == AVAudioSessionInterruptionTypeBegan) {
if (self.isRunning) {
- dispatch_async(self.taskQueue, ^{
+ dispatch_sync(self.taskQueue, ^{
NSLog(@"MicrophoneSource: stopRunning");
AudioOutputUnitStop(self.componetInstance);
});
diff --git a/LFLiveKit/publish/LFStreamingBuffer.m b/LFLiveKit/publish/LFStreamingBuffer.m
index 15ae4f35..1c6c5504 100755
--- a/LFLiveKit/publish/LFStreamingBuffer.m
+++ b/LFLiveKit/publish/LFStreamingBuffer.m
@@ -62,9 +62,7 @@ - (void)appendObject:(LFFrame *)frame {
} else {
///< 排序
[self.sortList addObject:frame];
- NSArray *sortedSendQuery = [self.sortList sortedArrayUsingFunction:frameDataCompare context:NULL];
- [self.sortList removeAllObjects];
- [self.sortList addObjectsFromArray:sortedSendQuery];
+ [self.sortList sortUsingFunction:frameDataCompare context:nil];
/// 丢帧
[self removeExpireFrame];
/// 添加至缓冲区