Simplify get_video_clock()
Originally committed as revision 21582 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
6
ffplay.c
6
ffplay.c
@@ -938,13 +938,11 @@ static double get_audio_clock(VideoState *is)
|
|||||||
/* get the current video clock value */
|
/* get the current video clock value */
|
||||||
static double get_video_clock(VideoState *is)
|
static double get_video_clock(VideoState *is)
|
||||||
{
|
{
|
||||||
double delta;
|
|
||||||
if (is->paused) {
|
if (is->paused) {
|
||||||
delta = 0;
|
return is->video_current_pts;
|
||||||
} else {
|
} 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 */
|
/* get the current external clock value */
|
||||||
|
Reference in New Issue
Block a user