summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-14 10:57:41 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-14 10:57:41 +0000
commit87fe226acbf8b02d99260e5fb3844fbc223b9dab (patch)
treef9e0376e9c0e2f84572bb29c6f895ae4fb7c1bf8 /mplayer.c
parent0337e0f26fc7050cc2253efcc086492ed013546a (diff)
downloadmpv-87fe226acbf8b02d99260e5fb3844fbc223b9dab.tar.bz2
mpv-87fe226acbf8b02d99260e5fb3844fbc223b9dab.tar.xz
fix A-V sync overcorrection for desync due to too slow hardware.
Patch by Uoti Urpala ( uoti urpala at pp1 inet fi ) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18089 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index 7dd45902fe..23a9e7372c 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3809,7 +3809,13 @@ if(time_frame>0.001 && !(vo_flags&256)){
++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)