changeset 33030:f3037de78b36

Generalize previous commit: assume that a 0 frame time is always wrong and replace it with a fps-based value.
author reimar
date Sat, 26 Mar 2011 16:02:44 +0000
parents 6b6320dcefdf
children 31ced51f7e47
files mplayer.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sat Mar 26 16:01:00 2011 +0000
+++ b/mplayer.c	Sat Mar 26 16:02:44 2011 +0000
@@ -2460,7 +2460,7 @@
 	    mp_msg(MSGT_CPLAYER, MSGL_V, "pts value < previous\n");
 	}
 	frame_time = sh_video->pts - sh_video->last_pts;
-	if (sh_video->last_pts == MP_NOPTS_VALUE)
+	if (!frame_time)
 	    frame_time = sh_video->frametime;
 	sh_video->last_pts = sh_video->pts;
 	sh_video->timer += frame_time;