From 950a461fd322edd7b2b9e1994a56dd798cae7e89 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 11 Jun 2026 15:55:40 +0200 Subject: [PATCH] avif: If we only have single image, return false at jumpToNextImage We were errorneously returning true here, as we do not have any more images to jump to. If we only have one image, return false. This avoids the avif handler getting stuck in a loop with only single images. BUG: 521200 FIXED-IN: 6.28 (cherry picked from commit 7edf807082286279d8962323a0378d566361031b) Co-authored-by: Akseli Lahtinen --- src/imageformats/avif.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imageformats/avif.cpp b/src/imageformats/avif.cpp index 6e644d9..d593cdb 100644 --- a/src/imageformats/avif.cpp +++ b/src/imageformats/avif.cpp @@ -1180,7 +1180,7 @@ bool QAVIFHandler::jumpToNextImage() if (m_decoder->imageIndex >= 0) { if (m_decoder->imageCount < 2) { m_parseState = ParseAvifSuccess; - return true; + return false; } if (m_decoder->imageIndex >= m_decoder->imageCount - 1) { // start from beginning