Skip to content

Commit

Permalink
Merge pull request #47 from ifbowen/master
Browse files Browse the repository at this point in the history
fix animated avif decode failed, os_unfair_lock crash
  • Loading branch information
dreampiggy authored Jan 30, 2023
2 parents 0f0003b + 6559b55 commit b320094
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SDWebImageAVIFCoder/Classes/SDImageAVIFCoder.m
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ - (UIImage *)animatedImageFrameAtIndex:(NSUInteger)index {
SD_LOCK(_lock);
avifResult decodeResult = avifDecoderNthImage(_decoder, (uint32_t)index);
if (decodeResult != AVIF_RESULT_OK) {
SD_UNLOCK(_lock);
return nil;
}
CGImageRef imageRef = SDCreateCGImageFromAVIF(_decoder->image);
Expand Down

0 comments on commit b320094

Please sign in to comment.