avformat/gif: use last frame duration

pull/389/head
Paul B Mahol 2 years ago
parent bd9d984c11
commit ff72256235
  1. 2
      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;
}

Loading…
Cancel
Save