aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2015-02-01 23:57:49 +0100
committerMarton Balint <cus@passwd.hu>2015-02-10 20:50:48 +0100
commit68850090b6d2effe3390a609a2cec8f16df88a77 (patch)
treee5a0e7569c317c34c245288459c90468063bf53b /ffplay.c
parent8b77c4dd424d8ee39dbca34b82ef12a8e483a68d (diff)
downloadffmpeg-68850090b6d2effe3390a609a2cec8f16df88a77.tar.gz
ffplay: update frame timer based on last updated clock time when toggling pause
It is better than using simply video clock, because video clock may be NAN. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index c112eada60..210bae585b 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1494,7 +1494,7 @@ static void stream_seek(VideoState *is, int64_t pos, int64_t rel, int seek_by_by
static void stream_toggle_pause(VideoState *is)
{
if (is->paused) {
- is->frame_timer += av_gettime_relative() / 1000000.0 + is->vidclk.pts_drift - is->vidclk.pts;
+ is->frame_timer += av_gettime_relative() / 1000000.0 - is->vidclk.last_updated;
if (is->read_pause_return != AVERROR(ENOSYS)) {
is->vidclk.paused = 0;
}