# HG changeset patch # User reimar # Date 1296671420 0 # Node ID 08deb5816d9c5d038b09e402d2cfbcc9fc5c5ed5 # Parent 9981c24b59bd93612c727fff6405d918e6d08473 Fix r32824: It broke -frames and many, many other things. Change only the ->eof handling case that needs to be changed to fix the sample instead. diff -r 9981c24b59bd -r 08deb5816d9c mplayer.c --- a/mplayer.c Tue Feb 01 20:45:41 2011 +0000 +++ b/mplayer.c Wed Feb 02 18:30:20 2011 +0000 @@ -3660,7 +3660,7 @@ } #endif -while(!mpctx->eof || (mpctx->sh_audio && !mpctx->d_audio->eof)){ +while(!mpctx->eof){ float aq_sleep_time=0; if(dvd_last_chapter>0) { @@ -3724,9 +3724,13 @@ mp_msg(MSGT_CPLAYER,MSGL_FATAL, MSGTR_NotInitializeVOPorVO); mpctx->eof = 1; goto goto_next_file; } - if (frame_time < 0) + if (frame_time < 0) { + // if we have no more video, sleep some arbitrary time + frame_time = 1.0/20.0; + // only stop playing when audio is at end as well + if (!mpctx->sh_audio || mpctx->d_audio->eof) mpctx->eof = 1; - else { + } else { // might return with !eof && !blit_frame if !correct_pts mpctx->num_buffered_frames += blit_frame; mpctx->time_frame += frame_time / playback_speed; // for nosound