Index: mplayer.c =================================================================== --- mplayer.c (revision 27776) +++ mplayer.c (working copy) @@ -2085,12 +2085,16 @@ static int sleep_until_update(float *time_frame, float *aq_sleep_time) { int frame_time_remaining = 0; + float delay = 0.0; current_module="calc_sleep_time"; *time_frame -= GetRelativeTime(); // reset timer - if (mpctx->sh_audio && !mpctx->d_audio->eof) { - float delay = mpctx->audio_out->get_delay(); + if (mpctx->sh_audio) { + // As long as there is audio buffers to sync the video to. + delay = mpctx->audio_out->get_delay(); + } + if (delay > 0.0) { mp_dbg(MSGT_AVSYNC, MSGL_DBG2, "delay=%f\n", delay); if (autosync) {