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:
commit
dddf4a8392
|
@ -179,12 +179,12 @@
|
||||||
#pragma mark - Animation Control
|
#pragma mark - Animation Control
|
||||||
- (void)startPlaying {
|
- (void)startPlaying {
|
||||||
[self.displayLink start];
|
[self.displayLink start];
|
||||||
// Calculate max buffer size
|
|
||||||
[self calculateMaxBufferCount];
|
|
||||||
// Setup frame
|
// Setup frame
|
||||||
if (self.currentFrameIndex == 0 && !self.currentFrame) {
|
if (self.currentFrameIndex == 0 && !self.currentFrame) {
|
||||||
[self setupCurrentFrame];
|
[self setupCurrentFrame];
|
||||||
}
|
}
|
||||||
|
// Calculate max buffer size
|
||||||
|
[self calculateMaxBufferCount];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)stopPlaying {
|
- (void)stopPlaying {
|
||||||
|
|
Loading…
Reference in New Issue