aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-01 09:26:30 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-01 09:26:30 +0000
commit41a4cd0c33624c7b8c38bc4a36e928257c8d5e3d (patch)
tree09b60c46142ff781d49adca294140dc94ec708be
parent5905536347aa0c191a117932d615f42fd82ad3ba (diff)
downloadffmpeg-41a4cd0c33624c7b8c38bc4a36e928257c8d5e3d.tar.gz
Simplify get_video_clock()
Originally committed as revision 21582 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffplay.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ffplay.c b/ffplay.c
index b70589e48c..097a82c289 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 */