Index: mencoder.c =================================================================== RCS file: /cvsroot/mplayer/main/mencoder.c,v retrieving revision 1.247 diff -u -r1.247 mencoder.c --- mencoder.c 30 Apr 2004 20:05:54 -0000 1.247 +++ mencoder.c 17 May 2004 19:51:10 -0000 @@ -1355,6 +1355,11 @@ v_pts=sh_video ? sh_video->pts : d_video->pts; // av = compensated (with out buffering delay) A-V diff AV_delay=(a_pts-v_pts); AV_delay-=mux_a->timer-(mux_v->timer-(v_timer_corr+v_pts_corr)); + if (AV_delay < -86400 || AV_delay > 86400) { + /* MPEG use 33 bit timestamps with 1/90000s timebase */ + float corr = (1<<30) * 8.0 / 90000.0; + AV_delay += AV_delay < 0 ? corr : -corr; + } // compensate input video timer by av: x=AV_delay*0.1f; if(x<-max_pts_correction) x=-max_pts_correction; else