From a6c0570987f8d650fb7b8aa5d3fe904305e72dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=BF=E7=A8=8B?= <05050314@163.com> Date: Tue, 9 Jan 2018 21:59:30 +0800 Subject: [PATCH] Bugfix for loopCount (#2155) If a GIF image has no Netscape 2.0 loop extension, it is meant to play once and then stop --- SDWebImage/SDWebImageGIFCoder.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDWebImage/SDWebImageGIFCoder.m b/SDWebImage/SDWebImageGIFCoder.m index 69172104..e05d1c0b 100644 --- a/SDWebImage/SDWebImageGIFCoder.m +++ b/SDWebImage/SDWebImageGIFCoder.m @@ -72,7 +72,7 @@ [frames addObject:frame]; } - NSUInteger loopCount = 0; + NSUInteger loopCount = 1; NSDictionary *imageProperties = (__bridge_transfer NSDictionary *)CGImageSourceCopyProperties(source, nil); NSDictionary *gifProperties = [imageProperties valueForKey:(__bridge_transfer NSString *)kCGImagePropertyGIFDictionary]; if (gifProperties) {