From 0510aafead61df0b1c1829ad95ba7ffdaee826f5 Mon Sep 17 00:00:00 2001 From: linyehui Date: Tue, 6 Dec 2016 15:36:42 +0800 Subject: [PATCH] =?UTF-8?q?using=20NSMutableArray=20sortUsingFunction=20in?= =?UTF-8?q?stead=20of=20NSArray=20sortedArrayUsingFunction=20=E6=80=A7?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96=EF=BC=8C=E5=90=8C=E6=97=B6=E4=B9=9F?= =?UTF-8?q?=E4=BC=9A=E4=BF=AE=E6=AD=A3=E5=A4=9A=E7=BA=BF=E7=A8=8B=E4=B8=8B?= =?UTF-8?q?=E4=BD=BF=E7=94=A8LFStreamSocket=E6=8E=A8=E6=B5=81=E7=9A=84?= =?UTF-8?q?=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]; /// 添加至缓冲区