This bug happens because of the hand crafted implementation of AVIFImageReader::repetitionCount(). This was added in r275184. 1. According to https://github.com/AOMediaCodec/av1-avif/issues/73#issuecomment-803017653, libavif does not provide the repetition count. 2. macOS system frameworks do not provide the repetition count for animated AVIF. 3. Chromium just indefinitely repeats all animated AVIF frames. So to be compatible with other browsers and image viewers, I think we need to return RepetitionCountInfinite for all animated AVIF images.
<rdar://problem/102164553>
Pull request: https://github.com/WebKit/WebKit/pull/6329
Committed 256665@main (70ff964ee191): <https://commits.webkit.org/256665@main> Reviewed commits have been landed. Closing PR #6329 and removing active labels.