提交 cb103a19 编写于 作者: S Stefano Sabatini

Make the input realtime framerate emulation code use ist->pts for

computing the time of the next frame to send to output.

See the thread: fix ffmpeg -re behaviour.

Originally committed as revision 15944 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 f653095b
......@@ -1306,7 +1306,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
/* frame rate emulation */
if (ist->st->codec->rate_emu) {
int64_t pts = av_rescale((int64_t) ist->frame * ist->st->codec->time_base.num, 1000000, ist->st->codec->time_base.den);
int64_t pts = av_rescale(ist->pts, 1000000, AV_TIME_BASE);
int64_t now = av_gettime() - ist->start;
if (pts > now)
usleep(pts - now);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册