[FFmpeg-cvslog] mpeg4videodec: use ROUNDED_DIV for pts calculation

Michael Niedermayer git at videolan.org
Mon Nov 26 21:09:49 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Nov 26 20:16:25 2012 +0100| [89d5262289ae02f31e1d04ac1400ca5c56242d50] | committer: Michael Niedermayer

mpeg4videodec: use ROUNDED_DIV for pts calculation

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/mpeg4videodec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index a55ab34..acbc525 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)



More information about the ffmpeg-cvslog mailing list