Fix to loss of sync in ffplay when paused patch by (Michael McConnell /// soruk put...
authorMichael McConnell <soruk@eridani.co.uk>
Wed, 7 Feb 2007 00:52:35 +0000 (00:52 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 7 Feb 2007 00:52:35 +0000 (00:52 +0000)
Originally committed as revision 7866 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffplay.c

index 1c3aa63..2504878 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -984,8 +984,9 @@ static void stream_seek(VideoState *is, int64_t pos, int rel)
 static void stream_pause(VideoState *is)
 {
     is->paused = !is->paused;
-    if (is->paused) {
+    if (!is->paused) {
         is->video_current_pts = get_video_clock(is);
+        is->frame_timer += (av_gettime() - is->video_current_pts_time) / 1000000.0;
     }
 }