PNG loader: Fix animated PNG loading some more

This commit is contained in:
Kim Woelders 2022-10-12 19:30:44 +02:00
parent 6e2267e740
commit f762a49c49
1 changed files with 7 additions and 5 deletions

View File

@ -363,7 +363,13 @@ _load(ImlibImage * im, int load_data)
D("\n");
if (im->frame_count == 0)
goto scan_done; /* No acTL before IDAT - Regular PNG */
#ifdef IMLIB2_DEBUG
break; /* Show all frames */
#else
if (ctx.pch_fctl)
goto scan_done; /* Got fcTL before IDAT - APNG using default frame */
break;
#endif
case PNG_TYPE_acTL:
#define P (&chunk->actl)
@ -387,11 +393,7 @@ _load(ImlibImage * im, int load_data)
if (im->frame_num != frame)
break;
ctx.pch_fctl = chunk; /* Remember fcTL location */
#if IMLIB2_DEBUG
break; /* Show all frames */
#else
goto scan_done;
#endif
break;
#undef P
case PNG_TYPE_IEND: