Bug 247704

Summary: [AVIF Downlevels] Animated AVIF image animates only one loop
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: ImagesAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: changseok, sabouhallawa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=223127
https://bugs.webkit.org/show_bug.cgi?id=248544

Description Said Abou-Hallawa 2022-11-09 15:49:34 PST
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.
Comment 1 Radar WebKit Bug Importer 2022-11-09 15:51:55 PST
<rdar://problem/102164553>
Comment 2 Said Abou-Hallawa 2022-11-09 17:35:11 PST
Pull request: https://github.com/WebKit/WebKit/pull/6329
Comment 3 EWS 2022-11-14 12:01:54 PST
Committed 256665@main (70ff964ee191): <https://commits.webkit.org/256665@main>

Reviewed commits have been landed. Closing PR #6329 and removing active labels.