aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-05-20 12:33:29 +0200
committerPaul B Mahol <onemda@gmail.com>2023-05-20 13:06:38 +0200
commitff72256235aeaa2a4e197b54f69bad36d61a57d0 (patch)
tree2c5a5b0df93b73f92e3da0edfde1a820dc702341
parentbd9d984c11c0057c7b504955952727f12af5c535 (diff)
downloadffmpeg-ff72256235aeaa2a4e197b54f69bad36d61a57d0.tar.gz
avformat/gif: use last frame duration
-rw-r--r--libavformat/gif.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/gif.c b/libavformat/gif.c
index bfa7deb598..568867cc5d 100644
--- a/libavformat/gif.c
+++ b/libavformat/gif.c
@@ -88,6 +88,8 @@ static int gif_get_delay(GIFContext *gif, AVPacket *prev, AVPacket *new)
gif->duration = av_clip_uint16(new->pts - prev->pts);
else if (!new && gif->last_delay >= 0)
gif->duration = gif->last_delay;
+ else if (prev->duration)
+ gif->duration = prev->duration;
return gif->duration;
}