ffplay: use more sane frame timer resetting logic

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2013-02-02 12:37:29 +01:00
parent 35b2f30fd1
commit 97e42551e4
1 changed files with 3 additions and 2 deletions

View File

@ -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))