mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
avif: return false
in canRead()
when imageIndex >= imageCount
Otherwise when `cache: false` is set in AnimatedImage, QMovie will try to read the image forever. BUG: 460085 FIXED-IN: 5.100
This commit is contained in:
parent
bcbf45e23a
commit
350ce1b990
@ -42,6 +42,11 @@ bool QAVIFHandler::canRead() const
|
||||
|
||||
if (m_parseState != ParseAvifError) {
|
||||
setFormat("avif");
|
||||
|
||||
if (m_parseState == ParseAvifSuccess && m_decoder->imageIndex >= m_decoder->imageCount - 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user