avcodec/mpeg4videoenc: fix encoding long frames

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/388/head
Michael Niedermayer 3 years ago
parent 3c43a7a354
commit 282589771a
  1. 4
      libavcodec/mpeg4videoenc.c

@ -1081,8 +1081,8 @@ int ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
time_mod = FFUMOD(s->time, s->avctx->time_base.den);
time_incr = time_div - s->last_time_base;
// This limits the frame duration to max 1 hour
if (time_incr > 3600) {
// This limits the frame duration to max 1 day
if (time_incr > 3600*24) {
av_log(s->avctx, AV_LOG_ERROR, "time_incr %"PRIu64" too large\n", time_incr);
return AVERROR(EINVAL);
}

Loading…
Cancel
Save