From f6feec3090bd8154e0ad21036812b6d89ec41adb Mon Sep 17 00:00:00 2001 From: chenliming Date: Thu, 17 Nov 2016 10:26:56 +0800 Subject: [PATCH 1/3] fix audioCapture crash --- LFLiveKit/capture/LFAudioCapture.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); }); From 0510aafead61df0b1c1829ad95ba7ffdaee826f5 Mon Sep 17 00:00:00 2001 From: linyehui Date: Tue, 6 Dec 2016 15:36:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?using=20NSMutableArray=20sortUsingFunction?= =?UTF-8?q?=20instead=20of=20NSArray=20sortedArrayUsingFunction=20?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96=EF=BC=8C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E4=B9=9F=E4=BC=9A=E4=BF=AE=E6=AD=A3=E5=A4=9A=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E4=B8=8B=E4=BD=BF=E7=94=A8LFStreamSocket=E6=8E=A8=E6=B5=81?= =?UTF-8?q?=E7=9A=84=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LFLiveKit/publish/LFStreamingBuffer.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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]; /// 添加至缓冲区 From 79ff5357ac466951421255978c399a5a35b11fc9 Mon Sep 17 00:00:00 2001 From: chenliming Date: Wed, 21 Dec 2016 09:55:42 +0800 Subject: [PATCH 3/3] update version --- FrameWork/Info.plist | 2 +- LFLiveKit.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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" }