This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit 8cdb2603684dfaa984de6836b207d0deb061691f
Author: Kim Woelders <[email protected]>
AuthorDate: Sat Oct 8 10:46:03 2022 +0200

    PNG loader: Correct frame delay in zero denominator case
---
 src/modules/loaders/loader_png.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/modules/loaders/loader_png.c b/src/modules/loaders/loader_png.c
index f69883a..6faf989 100644
--- a/src/modules/loaders/loader_png.c
+++ b/src/modules/loaders/loader_png.c
@@ -455,8 +455,9 @@ _load(ImlibImage * im, int load_data)
              if (pfctl->blend_op != APNG_BLEND_OP_SOURCE)
                 im->frame_flags |= FF_FRAME_BLEND;
              val = htons(pfctl->delay_den);
-             im->frame_delay =
-                val > 0 ? 1000 * htons(pfctl->delay_num) / val : 100;
+             if (val == 0)
+                val = 100;
+             im->frame_delay = 1000 * htons(pfctl->delay_num) / val;
 
              D("WxH=%dx%d(%dx%d) X,Y=%d,%d depth=%d color=%d comp=%d filt=%d interlace=%d disp=%d blend=%d delay=%d/%d\n",      //
                htonl(pfctl->w), htonl(pfctl->h),

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to