diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-06-26 16:00:39 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-07-03 12:18:45 +0000 |
commit | 85ed63f825da57103c68f73af5adeebf67db0da9 (patch) | |
tree | b0514153d225c8b18d21d62eb4330d5b1af7fd78 /src/plugins/imageformats/webp/qwebphandler.cpp | |
parent | 2454fdd917c469913ed5064966bdc707e771771b (diff) |
Fix QWebpHandler::canRead() to take animation frame count into account
Task-number: QTBUG-61641
Change-Id: I24a139cc75141a588f2ed2558da85cd2f8391af9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/plugins/imageformats/webp/qwebphandler.cpp')
-rw-r--r-- | src/plugins/imageformats/webp/qwebphandler.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/imageformats/webp/qwebphandler.cpp b/src/plugins/imageformats/webp/qwebphandler.cpp index 0bd89f6..5a0ae4a 100644 --- a/src/plugins/imageformats/webp/qwebphandler.cpp +++ b/src/plugins/imageformats/webp/qwebphandler.cpp @@ -74,6 +74,10 @@ bool QWebpHandler::canRead() const if (m_scanState != ScanError) { setFormat(QByteArrayLiteral("webp")); + + if (m_features.has_animation && m_iter.frame_num >= m_frameCount) + return false; + return true; } return false; |