[FFmpeg-cvslog] r15944 - trunk/ffmpeg.c

stefano subversion
Thu Nov 27 22:24:25 CET 2008


Author: stefano
Date: Thu Nov 27 22:24:25 2008
New Revision: 15944

Log:
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.


Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Thu Nov 27 22:24:25 2008
@@ -1306,7 +1306,7 @@ static int output_packet(AVInputStream *
 
         /* 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);




More information about the ffmpeg-cvslog mailing list