src/3rdparty/patches/libmng-1.0.10-endless-loop.patch
changeset 0 1918ee327afb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/3rdparty/patches/libmng-1.0.10-endless-loop.patch	Mon Jan 11 14:00:40 2010 +0000
@@ -0,0 +1,65 @@
+--- libmng_data.h.orig	2007-04-20 10:41:58.000000000 +0200
++++ libmng_data.h	2007-07-14 00:00:00.000000000 +0200
+@@ -658,6 +658,9 @@
+            mng_int32         iFrameclipb;
+ 
+            mng_uint32        iNextdelay;         /* delay *after* next image */
++
++           mng_bool          bForcedelay;
++           mng_uint32        iAccumdelay;
+ #endif
+ 
+ #ifndef MNG_SKIPCHUNK_SHOW
+--- libmng_display.c.orig	2007-04-20 10:41:58.000000000 +0200
++++ libmng_display.c	2007-07-14 00:00:00.000000000 +0200
+@@ -384,8 +384,9 @@
+ 
+   {
+ #ifndef MNG_SKIPCHUNK_FRAM
+-    if (pData->iFramedelay > 0)        /* real delay ? */
++    if (pData->iFramedelay > 0 || pData->bForcedelay) /* real delay ? */
+     {                                  /* let the app refresh first ? */
++      pData->bForcedelay = MNG_FALSE;
+       if ((pData->bRunning) && (!pData->bSkipping) &&
+           (pData->iUpdatetop < pData->iUpdatebottom) && (pData->iUpdateleft < pData->iUpdateright))
+         if (!pData->fRefresh (((mng_handle)pData),
+@@ -455,6 +456,7 @@
+       pData->iFrametime = pData->iFrametime + iWaitfor;
+                                        /* setup for next delay */
+     pData->iFramedelay = pData->iNextdelay;
++    pData->iAccumdelay += pData->iFramedelay;
+ #endif
+   }
+ 
+@@ -3340,6 +3342,9 @@
+   MNG_TRACE (pData, MNG_FN_PROCESS_DISPLAY_MEND, MNG_LC_START);
+ #endif
+ 
++  pData->bForcedelay = pData->iAccumdelay ? MNG_FALSE : MNG_TRUE;
++  pData->iAccumdelay = 0;
++
+ #ifdef MNG_SUPPORT_DYNAMICMNG
+   if (pData->bStopafterseek)           /* need to stop after this ? */
+   {
+--- libmng_hlapi.c.orig	2007-07-06 18:23:04.000000000 +0200
++++ libmng_hlapi.c	2007-07-14 00:00:00.000000000 +0200
+@@ -446,6 +446,9 @@
+   pData->iFrameclipb           = 0;
+ 
+   pData->iNextdelay            = 1;
++
++  pData->bForcedelay           = MNG_FALSE;
++  pData->iAccumdelay           = 0;
+ #endif
+ 
+ #ifndef MNG_SKIPCHUNK_SHOW
+@@ -1737,6 +1740,9 @@
+   pData->iFrameclipb           = 0;
+ 
+   pData->iNextdelay            = 1;
++
++  pData->bForcedelay           = MNG_FALSE;
++  pData->iAccumdelay           = 0;
+ #endif
+ 
+ #ifndef MNG_SKIPCHUNK_SHOW