mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 16:52:31 +00:00
avformat/gif: use last frame duration
This commit is contained in:
parent
bd9d984c11
commit
ff72256235
@ -88,6 +88,8 @@ static int gif_get_delay(GIFContext *gif, AVPacket *prev, AVPacket *new)
|
|||||||
gif->duration = av_clip_uint16(new->pts - prev->pts);
|
gif->duration = av_clip_uint16(new->pts - prev->pts);
|
||||||
else if (!new && gif->last_delay >= 0)
|
else if (!new && gif->last_delay >= 0)
|
||||||
gif->duration = gif->last_delay;
|
gif->duration = gif->last_delay;
|
||||||
|
else if (prev->duration)
|
||||||
|
gif->duration = prev->duration;
|
||||||
|
|
||||||
return gif->duration;
|
return gif->duration;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user