OSDN Git Service

ffmpeg: use ist->dts in rate_emu_sleep()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Feb 2012 16:25:40 +0000 (17:25 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 8 Feb 2012 16:25:40 +0000 (17:25 +0100)
Based on change by Anton Khirnov.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index a80b632..63749e6 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1937,7 +1937,7 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
 static void rate_emu_sleep(InputStream *ist)
 {
     if (input_files[ist->file_index].rate_emu) {
-        int64_t pts = av_rescale(ist->pts, 1000000, AV_TIME_BASE);
+        int64_t pts = av_rescale(ist->dts, 1000000, AV_TIME_BASE);
         int64_t now = av_gettime() - ist->start;
         if (pts > now)
             usleep(pts - now);