Mercurial > libavcodec.hg
diff h263.c @ 1829:7ae26b6e197f libavcodec
set AVFrame.pts based upon framerate if its 0
detect & warn if the user prvides pts only for some frames, and try to guess the missing ones
author | michael |
---|---|
date | Wed, 25 Feb 2004 02:05:50 +0000 |
parents | 95612d423fde |
children | cd2d7fcfab7a |
line wrap: on
line diff
--- a/h263.c Mon Feb 23 21:18:29 2004 +0000 +++ b/h263.c Wed Feb 25 02:05:50 2004 +0000 @@ -2156,10 +2156,9 @@ void ff_set_mpeg4_time(MpegEncContext * s, int picture_number){ int time_div, time_mod; - if(s->current_picture_ptr->pts) - s->time= (s->current_picture_ptr->pts*s->time_increment_resolution + 500*1000)/(1000*1000); - else - s->time= av_rescale(picture_number*(int64_t)s->avctx->frame_rate_base, s->time_increment_resolution, s->avctx->frame_rate); + assert(s->current_picture_ptr->pts); + s->time= (s->current_picture_ptr->pts*s->time_increment_resolution + 500*1000)/(1000*1000); + time_div= s->time/s->time_increment_resolution; time_mod= s->time%s->time_increment_resolution;