summaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2013-02-02 12:37:29 +0100
committerMarton Balint <cus@passwd.hu>2013-06-01 12:50:46 +0200
commit97e42551e468cdce53a667f33c9e9002b21db3c8 (patch)
tree3ad8f6dd3521bdec27c6850d2a592576b7719ad4 /ffplay.c
parent35b2f30fd119c404e37b4b48cfb89f63a648a4ed (diff)
downloadffmpeg-streaming-97e42551e468cdce53a667f33c9e9002b21db3c8.zip
ffmpeg-streaming-97e42551e468cdce53a667f33c9e9002b21db3c8.tar.gz
ffplay: use more sane frame timer resetting logic
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index 085c080..a14b5f2 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1378,8 +1378,9 @@ retry:
return;
}
- if (delay > 0)
- is->frame_timer += delay * FFMAX(1, floor((time-is->frame_timer) / delay));
+ is->frame_timer += delay;
+ if (delay > 0 && time - is->frame_timer > AV_SYNC_THRESHOLD_MAX)
+ is->frame_timer = time;
SDL_LockMutex(is->pictq_mutex);
if (!redisplay && !isnan(vp->pts))
OpenPOWER on IntegriCloud