Merge pull request #2982 from dreampiggy/bugfix_animated_image_buffer_calculation

Fix that when first play animated image and use maxBufferSize to 0, the calculation does not works (The CGImage is nil)
This commit is contained in:
DreamPiggy 2020-04-11 16:43:29 +08:00 committed by GitHub
commit dddf4a8392
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -179,12 +179,12 @@
#pragma mark - Animation Control
- (void)startPlaying {
[self.displayLink start];
// Calculate max buffer size
[self calculateMaxBufferCount];
// Setup frame
if (self.currentFrameIndex == 0 && !self.currentFrame) {
[self setupCurrentFrame];
}
// Calculate max buffer size
[self calculateMaxBufferCount];
}
- (void)stopPlaying {