# HG changeset patch # User reimar # Date 1145012261 0 # Node ID 18d57fb6d32069d5e2d2143c67a677b6adca375b # Parent edffd6f8a022983e7862fa91475f8cea6e633621 fix A-V sync overcorrection for desync due to too slow hardware. Patch by Uoti Urpala ( uoti urpala at pp1 inet fi ) diff -r edffd6f8a022 -r 18d57fb6d320 mplayer.c --- 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)