Skip to content

Commit

Permalink
Merge pull request #2982 from dreampiggy/bugfix_animated_image_buffer…
Browse files Browse the repository at this point in the history
…_calculation

Fix that when first play animated image and use maxBufferSize to 0, the calculation does not works (The CGImage is nil)
  • Loading branch information
dreampiggy committed Apr 11, 2020
2 parents f52dc6b + 13bae85 commit dddf4a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SDWebImage/Core/SDAnimatedImagePlayer.m
Expand Up @@ -179,12 +179,12 @@ - (void)clearFrameBuffer {
#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 {
Expand Down

0 comments on commit dddf4a8

Please sign in to comment.