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:
parent
19bf8473e6
commit
65e7789863
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -661,7 +661,7 @@ impl FrameBufferExt for ArcSwap<FrameBuffer> {
|
|||
if self
|
||||
.load()
|
||||
.images
|
||||
.get(1)
|
||||
.front()
|
||||
.is_some_and(|next_frame| elapsed >= next_frame.delay)
|
||||
{
|
||||
self.rcu(|tiling_store| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue