Krolyxon
Commit 3140638

Branches

Refs →

nsxiv3140638

fix: wrong length on animated webp (#381)

the length member needed to be zero-ed before we started decoding.
this was causing unintended behavior of playing an animated webp longer
than it should under slideshow mode.
Author
NRK
Date
2022-10-25 20:34 +0200
Parent
e197429
Commit
314063804293ff37ece428b512f8138ecd1eb7fc

+1 −1

1 file changed

  1. M image.c +1 −1
M image.c View
@@ -378,7 +378,7 @@ static bool img_load_webp(img_t *img, const fileinfo_t *file)
378378 }
379379
380380 /* Load and decode frames (also works on images with only 1 frame) */
381− m->cnt = m->sel = 0;
381+ m->length = m->cnt = m->sel = 0;
382382 while (WebPAnimDecoderGetNext(dec, &buf, &ts)) {
383383 im = imlib_create_image_using_copied_data(
384384 info.canvas_width, info.canvas_height, (uint32_t *)buf);