diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-28 13:55:06 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-28 14:12:37 +0100 |
commit | 17e47ec8be200d54aa7ef31994e1ba5ea5f32622 (patch) | |
tree | 76487e09972cc3e450aebfcaa6259262e88e3e45 /libavcodec | |
parent | feba750dcd49e8410a4abaf3fbcc0554452206bc (diff) | |
parent | a1c5cc429d99216406170eac7e8352860076d3e8 (diff) | |
download | ffmpeg-streaming-17e47ec8be200d54aa7ef31994e1ba5ea5f32622.zip ffmpeg-streaming-17e47ec8be200d54aa7ef31994e1ba5ea5f32622.tar.gz |
Merge commit 'a1c5cc429d99216406170eac7e8352860076d3e8'
* commit 'a1c5cc429d99216406170eac7e8352860076d3e8':
lavc: don't set AVFrame.pts to random numbers in decoders.
Conflicts:
libavcodec/mpeg4videodec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h261dec.c | 1 | ||||
-rw-r--r-- | libavcodec/ituh263dec.c | 1 | ||||
-rw-r--r-- | libavcodec/mpeg4videodec.c | 7 |
3 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 50bfec9..5e45fc7 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -478,7 +478,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 08aeb30..2cad21d 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -895,7 +895,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 dd97bd7..6de1735 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -1948,6 +1948,7 @@ static int decode_user_data(MpegEncContext *s, GetBitContext *gb){ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ int time_incr, time_increment; + int64_t pts; s->pict_type = get_bits(gb, 2) + AV_PICTURE_TYPE_I; /* pict type: I = 0 , P = 1 */ if(s->pict_type==AV_PICTURE_TYPE_B && s->low_delay && s->vol_control_parameters==0 && !(s->flags & CODEC_FLAG_LOW_DELAY)){ @@ -2023,12 +2024,12 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){ } if(s->avctx->time_base.num) - s->current_picture_ptr->f.pts = ROUNDED_DIV(s->time, s->avctx->time_base.num); + pts = ROUNDED_DIV(s->time, s->avctx->time_base.num); else - s->current_picture_ptr->f.pts = AV_NOPTS_VALUE; + 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); + pts); check_marker(gb, "before vop_coded"); |