Skip to content

Commit ae96dca

Browse files
authored
Merge pull request #66 from SDWebImage/bugfix/calculation_buffer_size
Fix the wrong calculation of buffer of AVIF image which cause memory peak
2 parents f784fcf + da93d8f commit ae96dca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SDWebImageAVIFCoder/Classes/Conversion.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static CGImageRef CreateCGImage8(avifImage * avif) {
186186

187187
vImage_YpCbCrToARGB convInfo = {0};
188188

189-
resultBufferData = calloc(components * rowBytes * avif->height, sizeof(uint8_t));
189+
resultBufferData = calloc(rowBytes * avif->height, sizeof(uint8_t));
190190
if(resultBufferData == NULL) {
191191
goto end_all;
192192
}

0 commit comments

Comments
 (0)