History

avformat/gif: use last frame duration

Paul B Mahol committed 3 years ago

Commit ff722561 parent bd9d9841 file · +2 −0Browse files

Unified · Split

libavformat/gif.c+2−0
@@ -88,6 +88,8 @@ static int gif_get_delay(GIFContext *gif, AVPacket *prev, AVPacket *new) · 87 unmodified lines
8888 gif->duration = av_clip_uint16(new->pts - prev->pts);
8989 else if (!new && gif->last_delay >= 0)
9090 gif->duration = gif->last_delay;
91+ else if (prev->duration)
92+ gif->duration = prev->duration;
9193
9294 return gif->duration;
9395 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t