[FFmpeg-cvslog] lavc: don't set AVFrame.pts to random numbers in decoders.

Anton Khirnov git at videolan.org
Mon Oct 28 14:20:22 CET 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Oct 27 15:33:37 2013 +0100| [a1c5cc429d99216406170eac7e8352860076d3e8] | committer: Anton Khirnov

lavc: don't set AVFrame.pts to random numbers in decoders.

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

 libavcodec/h261dec.c       |    1 -
 libavcodec/ituh263dec.c    |    1 -
 libavcodec/mpeg4videodec.c |    8 --------
 3 files changed, 10 deletions(-)

diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index f88831f..479da77 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -476,7 +476,6 @@ static int h261_decode_picture_header(H261Context *h)
     s->picture_number = (s->picture_number & ~31) + i;
 
     s->avctx->time_base      = (AVRational) { 1001, 30000 };
-    s->current_picture.f.pts = s->picture_number;
 
     /* PTYPE starts here */
     skip_bits1(&s->gb); /* split screen off */
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 25dd4d9..2ddc227 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -885,7 +885,6 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
     i = get_bits(&s->gb, 8); /* picture timestamp */
     if( (s->picture_number&~0xFF)+i < s->picture_number)
         i+= 256;
-    s->current_picture_ptr->f.pts =
     s->picture_number= (s->picture_number&~0xFF) + i;
 
     /* PTYPE starts here */
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 2b486ce..9a0b42b 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -1965,14 +1965,6 @@ 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;
-    else
-        s->current_picture_ptr->f.pts = AV_NOPTS_VALUE;
-    if(s->avctx->debug&FF_DEBUG_PTS)
-        av_log(s->avctx, AV_LOG_DEBUG, "MPEG4 PTS: %"PRId64"\n",
-               s->current_picture_ptr->f.pts);
-
     check_marker(gb, "before vop_coded");
 
     /* vop coded */



More information about the ffmpeg-cvslog mailing list