diff --git a/YYImage/YYImageCoder.m b/YYImage/YYImageCoder.m index 973a2b8..66cf46e 100644 --- a/YYImage/YYImageCoder.m +++ b/YYImage/YYImageCoder.m @@ -2630,7 +2630,7 @@ - (NSData *)_encodeAPNG { chunk_fcTL.sequence_number = apngSequenceIndex; chunk_fcTL.width = frame->header.width; chunk_fcTL.height = frame->header.height; - yy_png_delay_to_fraction([(NSNumber *)_durations[0] doubleValue], &chunk_fcTL.delay_num, &chunk_fcTL.delay_den); + yy_png_delay_to_fraction([(NSNumber *)_durations[i] doubleValue], &chunk_fcTL.delay_num, &chunk_fcTL.delay_den); chunk_fcTL.delay_num = chunk_fcTL.delay_num; chunk_fcTL.delay_den = chunk_fcTL.delay_den; chunk_fcTL.dispose_op = YY_PNG_DISPOSE_OP_BACKGROUND;