[FFmpeg-cvslog] r21582 - trunk/ffplay.c

michael subversion
Mon Feb 1 10:26:30 CET 2010


Author: michael
Date: Mon Feb  1 10:26:30 2010
New Revision: 21582

Log:
Simplify  get_video_clock()

Modified:
   trunk/ffplay.c

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	Mon Feb  1 04:12:01 2010	(r21581)
+++ trunk/ffplay.c	Mon Feb  1 10:26:30 2010	(r21582)
@@ -938,13 +938,11 @@ static double get_audio_clock(VideoState
 /* get the current video clock value */
 static double get_video_clock(VideoState *is)
 {
-    double delta;
     if (is->paused) {
-        delta = 0;
+        return is->video_current_pts;
     } else {
-        delta = (av_gettime() - is->video_current_pts_time) / 1000000.0;
+        return is->video_current_pts + (av_gettime() - is->video_current_pts_time) / 1000000.0;
     }
-    return is->video_current_pts + delta;
 }
 
 /* get the current external clock value */



More information about the ffmpeg-cvslog mailing list