[SCM] libav/experimental: Simplify get_video_clock()

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:59:13 UTC 2013


The following commit has been merged in the experimental branch:
commit 41a4cd0c33624c7b8c38bc4a36e928257c8d5e3d
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Mon Feb 1 09:26:30 2010 +0000

    Simplify  get_video_clock()
    
    Originally committed as revision 21582 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/ffplay.c b/ffplay.c
index b70589e..097a82c 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -938,13 +938,11 @@ static double get_audio_clock(VideoState *is)
 /* 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 */

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list