[FFmpeg-cvslog] ffplay: update frame timer based on last updated clock time when toggling pause

Marton Balint git at videolan.org
Tue Feb 10 23:53:23 CET 2015


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sun Feb  1 23:57:49 2015 +0100| [68850090b6d2effe3390a609a2cec8f16df88a77] | committer: Marton Balint

ffplay: update frame timer based on last updated clock time when toggling pause

It is better than using simply video clock, because video clock may be NAN.

Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=68850090b6d2effe3390a609a2cec8f16df88a77
---

 ffplay.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffplay.c b/ffplay.c
index c112ead..210bae5 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1494,7 +1494,7 @@ static void stream_seek(VideoState *is, int64_t pos, int64_t rel, int seek_by_by
 static void stream_toggle_pause(VideoState *is)
 {
     if (is->paused) {
-        is->frame_timer += av_gettime_relative() / 1000000.0 + is->vidclk.pts_drift - is->vidclk.pts;
+        is->frame_timer += av_gettime_relative() / 1000000.0 - is->vidclk.last_updated;
         if (is->read_pause_return != AVERROR(ENOSYS)) {
             is->vidclk.paused = 0;
         }



More information about the ffmpeg-cvslog mailing list