Index: mplayer.c =================================================================== --- mplayer.c (revision 30479) +++ mplayer.c (working copy) @@ -2031,6 +2031,16 @@ } #endif /* CONFIG_DVDNAV */ +static void avfile_print(double delay) +{ + static FILE *avfile; + + if (avfile == NULL) { + avfile = fopen("av-desynch.txt", "w"); + } + fprintf(avfile, "%lld\n", (long long int)(delay * 1000000ll)); +} + static void adjust_sync_and_print_status(int between_frames, float timing_error) { current_module="av_sync"; @@ -2060,6 +2070,8 @@ static int drop_message=0; double AV_delay = a_pts - audio_delay - v_pts; double x; + + avfile_print(AV_delay); if (AV_delay>0.5 && drop_frame_cnt>50 && drop_message==0){ ++drop_message; mp_msg(MSGT_AVSYNC,MSGL_WARN,MSGTR_SystemTooSlow);