Message ID | 20210829170955.27105-1-onemda@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/2] avformat/gif: use last packet duration | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
diff --git a/libavformat/gif.c b/libavformat/gif.c index cba87d3eae..61a45d73ca 100644 --- a/libavformat/gif.c +++ b/libavformat/gif.c @@ -87,6 +87,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 (!new && prev->duration) + gif->duration = prev->duration; return gif->duration; }
Signed-off-by: Paul B Mahol <onemda@gmail.com> --- libavformat/gif.c | 2 ++ 1 file changed, 2 insertions(+)