diff mplayer.c @ 18088:18d57fb6d320

fix A-V sync overcorrection for desync due to too slow hardware. Patch by Uoti Urpala ( uoti urpala at pp1 inet fi )
author reimar
date Fri, 14 Apr 2006 10:57:41 +0000
parents a597ca1c0adc
children c75f2ea46547
line wrap: on
line diff
--- a/mplayer.c	Fri Apr 14 10:47:40 2006 +0000
+++ b/mplayer.c	Fri Apr 14 10:57:41 2006 +0000
@@ -3809,7 +3809,13 @@
 	  ++drop_message;
 	  mp_msg(MSGT_AVSYNC,MSGL_WARN,MSGTR_SystemTooSlow);
 	}
-        x=AV_delay*0.1f;
+	if (autosync)
+	    x = AV_delay*0.1f;
+	else
+	    /* Do not correct target time for the next frame if this frame
+	     * was late not because of wrong target time but because the
+	     * target time could not be met */
+	    x = (AV_delay + time_frame * playback_speed) * 0.1f;
         if(x<-max_pts_correction) x=-max_pts_correction; else
         if(x> max_pts_correction) x= max_pts_correction;
         if(default_max_pts_correction>=0)