[FFmpeg-devel] [PATCH 6/7] ffplay: use more sane frame timer resetting logic
Marton Balint
cus at passwd.hu
Sun May 26 22:50:57 CEST 2013
Signed-off-by: Marton Balint <cus at passwd.hu>
---
ffplay.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index c0f3c4a..e5fae7f 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))
--
1.8.1.4
More information about the ffmpeg-devel
mailing list