Commit 3c00436b authored by Michael Niedermayer's avatar Michael Niedermayer

100l

Originally committed as revision 3501 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 61cef293
...@@ -1974,15 +1974,16 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg){ ...@@ -1974,15 +1974,16 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg){
return -1; return -1;
} }
} }
s->user_specified_pts= pic->pts;
}else{ }else{
if(s->user_specified_pts != AV_NOPTS_VALUE){ if(s->user_specified_pts != AV_NOPTS_VALUE){
s->user_specified_pts=
pic->pts= s->user_specified_pts + AV_TIME_BASE*(int64_t)s->avctx->frame_rate_base / s->avctx->frame_rate; pic->pts= s->user_specified_pts + AV_TIME_BASE*(int64_t)s->avctx->frame_rate_base / s->avctx->frame_rate;
av_log(s->avctx, AV_LOG_INFO, "Warning: AVFrame.pts=? trying to guess (%Ld)\n", pic->pts); av_log(s->avctx, AV_LOG_INFO, "Warning: AVFrame.pts=? trying to guess (%Ld)\n", pic->pts);
}else{ }else{
pic->pts= av_rescale(pic->display_picture_number*(int64_t)s->avctx->frame_rate_base, AV_TIME_BASE, s->avctx->frame_rate); pic->pts= av_rescale(pic->display_picture_number*(int64_t)s->avctx->frame_rate_base, AV_TIME_BASE, s->avctx->frame_rate);
} }
} }
s->user_specified_pts= pic->pts;
} }
/* shift buffer entries */ /* shift buffer entries */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment