Skip to content

Commit

Permalink
Merge pull request LaiFengiOS#152 from linyehui/master
Browse files Browse the repository at this point in the history
using NSMutableArray sortUsingFunction instead of NSArray sortedArray…
  • Loading branch information
小歪~~~ authored Dec 20, 2016
2 parents f6feec3 + 0510aaf commit 2989ffd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions LFLiveKit/publish/LFStreamingBuffer.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
/// 添加至缓冲区
Expand Down

0 comments on commit 2989ffd

Please sign in to comment.