[FFmpeg-cvslog] avcodec/mpeg4videoenc: fix encoding long frames

Michael Niedermayer git at videolan.org
Wed Jul 20 17:34:16 EEST 2022


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Jul 17 21:16:12 2022 +0200| [282589771a9cb690c0198eb1acde37c4ff25e23c] | committer: Michael Niedermayer

avcodec/mpeg4videoenc: fix encoding long frames

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=282589771a9cb690c0198eb1acde37c4ff25e23c
---

 libavcodec/mpeg4videoenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index f1c65f7c2d..b0825fd3e3 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/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);
     }



More information about the ffmpeg-cvslog mailing list