From 13bae85e3dbda81b5ce44a7034e30735dd44d187 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Fri, 10 Apr 2020 23:34:23 +0800 Subject: [PATCH] Fix that when first play animated image and use maxBufferSize to 0, the calculation does not works (The CGImage is nil) --- SDWebImage/Core/SDAnimatedImagePlayer.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDWebImage/Core/SDAnimatedImagePlayer.m b/SDWebImage/Core/SDAnimatedImagePlayer.m index 39658b43..54135094 100644 --- a/SDWebImage/Core/SDAnimatedImagePlayer.m +++ b/SDWebImage/Core/SDAnimatedImagePlayer.m @@ -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 {