kf5-kimageformats/350ce1b990460cb2178f369f22fe80803f5645f3.diff
2022-10-16 16:04:30 +02:00

17 lines
547 B
Diff

diff --git a/src/imageformats/avif.cpp b/src/imageformats/avif.cpp
index 2865a4eb42f067d629a8dfca4d59d6dc08f09811..c4f7a0f8a36a03b4f2cc9c15bde7fcd1eba51f76 100644
--- a/src/imageformats/avif.cpp
+++ b/src/imageformats/avif.cpp
@@ -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;