This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit c8949215c935c2cf6b65d4fad69a4f33d05111c5 Author: Michael Niedermayer <[email protected]> AuthorDate: Thu Sep 17 17:02:55 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Sat Sep 19 18:47:12 2026 +0000 avcodec/mpeg4videoenc: compute the GOP header time with av_rescale_rnd() pts * time_base.num can overflow int64_t; av_rescale_rnd() computes the same floor division exactly. --- libavcodec/mpeg4videoenc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index a10da6af82..f7aa635d2e 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -861,10 +861,9 @@ static void mpeg4_encode_gop_header(MPVMainEncContext *const m) time = s->c.cur_pic.ptr->f->pts; if (m->reordered_input_picture[1]) time = FFMIN(time, m->reordered_input_picture[1]->f->pts); - time = time * s->c.avctx->time_base.num; - s->c.last_time_base = FFUDIV(time, s->c.avctx->time_base.den); + seconds = av_rescale_rnd(time, s->c.avctx->time_base.num, s->c.avctx->time_base.den, AV_ROUND_DOWN); + s->c.last_time_base = seconds; - seconds = FFUDIV(time, s->c.avctx->time_base.den); minutes = FFUDIV(seconds, 60); seconds = FFUMOD(seconds, 60); hours = FFUDIV(minutes, 60); minutes = FFUMOD(minutes, 60); hours = FFUMOD(hours , 24); -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
