decoder: Fix animations with variable frame length

Before, the length of the first frame was used for all frames.

Part-of: <https://gitlab.gnome.org/GNOME/loupe/-/merge_requests/300>
This commit is contained in:
Sophie Herold 2023-09-27 00:47:24 +02:00 • committed by Marge Bot
parent 19bf8473e6
commit 65e7789863
2 changed files with 2 additions and 2 deletions

View file

@ -106,7 +106,7 @@ impl Glycin {
texture: frame.texture,
};
tiles.push_frame(tile, dimensions, delay);
tiles.push_frame(tile, dimensions, frame.delay.unwrap_or(delay));
if tiles.n_frames() >= FRAME_BUFFER {
break;