[FFmpeg-cvslog] ffplay: use more sane frame timer resetting logic
Marton Balint
git at videolan.org
Sat Jun 1 23:58:44 CEST 2013
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Feb 2 12:37:29 2013 +0100| [97e42551e468cdce53a667f33c9e9002b21db3c8] | committer: Marton Balint
ffplay: use more sane frame timer resetting logic
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97e42551e468cdce53a667f33c9e9002b21db3c8
---
ffplay.c | 5 +++--
1 file 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))
More information about the ffmpeg-cvslog
mailing list