[FFmpeg-cvslog] avformat/gif: use last frame duration
Paul B Mahol
git at videolan.org
Sat May 20 14:00:59 EEST 2023
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat May 20 12:33:29 2023 +0200| [ff72256235aeaa2a4e197b54f69bad36d61a57d0] | committer: Paul B Mahol
avformat/gif: use last frame duration
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff72256235aeaa2a4e197b54f69bad36d61a57d0
---
libavformat/gif.c | 2 ++
1 file changed, 2 insertions(+)
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;
}
More information about the ffmpeg-cvslog
mailing list