Commit 1b8090c2 authored by Sergio Ahumada's avatar Sergio Ahumada
Browse files

Merge branch 'dev' into stable

This starts Qt 5.1 release cycle

Change-Id: I2fc10bd848450dd3102e8525ba226ce3aa027cdd
parents 3e7042fb 313d60c1
No related merge requests found
Showing with 8 additions and 0 deletions
......@@ -263,6 +263,7 @@ mng_bool QMngHandlerPrivate::processHeader(mng_uint32 iWidth, mng_uint32 iHeight
bool QMngHandlerPrivate::getNextImage(QImage *result)
{
mng_retcode ret;
const bool savedHaveReadAll = haveReadAll;
if (haveReadNone) {
haveReadNone = false;
ret = mng_readdisplay(hMNG);
......@@ -271,6 +272,13 @@ bool QMngHandlerPrivate::getNextImage(QImage *result)
}
if ((MNG_NOERROR == ret) || (MNG_NEEDTIMERWAIT == ret)) {
*result = image;
// QTBUG-28894 -- libmng produces an extra frame at the end
// of the animation on the first loop only.
if (nextDelay == 1 && (!savedHaveReadAll && haveReadAll)) {
ret = mng_display_resume(hMNG);
}
frameIndex = nextIndex++;
if (haveReadAll && (frameCount == 0))
frameCount = nextIndex;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment