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-10 23:34:23 +08:00
parent f52dc6b4bd
commit 13bae85e3d
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 {