summaryrefslogtreecommitdiff
path: root/libavcodec/h263.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-02-25 02:05:50 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-02-25 02:05:50 +0000
commite51f49487e13e544e4540d60ed4e4c28f1b5ef62 (patch)
tree824b530b7d10be91bffa5ac2442c6ba014eaa17c /libavcodec/h263.c
parented7b99bbe26858de3f6c019359f69b00b94b5aa1 (diff)
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 Originally committed as revision 2812 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r--libavcodec/h263.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index 313214cd45..2318c07774 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -2156,10 +2156,9 @@ void ff_mpeg4_stuffing(PutBitContext * pbc)
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;