From 3b6f1526c69bf45936b9ea605a1b72b65a948ce4 Mon Sep 17 00:00:00 2001
From: Marton Balint <cus@passwd.hu>
Date: Sat, 2 Feb 2013 12:37:29 +0100
Subject: [PATCH] ffplay: use 0 frame delay if redisplaying an already
 displayed frame

With the previous patches this finally fixes ticket #1707.

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 ffplay.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ffplay.c b/ffplay.c
index a14b5f2e3ec..ab50db8e1dd 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1370,7 +1370,10 @@ retry:
                 /* if duration of the last frame was sane, update last_duration in video state */
                 is->frame_last_duration = last_duration;
             }
-            delay = compute_target_delay(is->frame_last_duration, is);
+            if (redisplay)
+                delay = 0.0;
+            else
+                delay = compute_target_delay(is->frame_last_duration, is);
 
             time= av_gettime()/1000000.0;
             if (time < is->frame_timer + delay && !redisplay) {
-- 
GitLab