diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index a55ab3474e..acbc525a38 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2007,7 +2007,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ } if(s->avctx->time_base.num) - s->current_picture_ptr->f.pts = (s->time + s->avctx->time_base.num / 2) / s->avctx->time_base.num; + s->current_picture_ptr->f.pts = ROUNDED_DIV(s->time, s->avctx->time_base.num); else s->current_picture_ptr->f.pts = AV_NOPTS_VALUE; if(s->avctx->debug&FF_DEBUG_PTS)