Mercurial > mplayer.hg
comparison mplayer.c @ 37165:681c7f805a23
Double-check that we are really at audio EOF by trying to refill.
Somewhat improves trac #2196.
author | reimar |
---|---|
date | Sun, 31 Aug 2014 09:33:38 +0000 |
parents | d4fbf2eb4a04 |
children |
comparison
equal
deleted
inserted
replaced
37164:22355747d51f | 37165:681c7f805a23 |
---|---|
3821 // if we have no more video, sleep some arbitrary time | 3821 // if we have no more video, sleep some arbitrary time |
3822 frame_time = 1.0 / 20.0; | 3822 frame_time = 1.0 / 20.0; |
3823 // Ensure vo_pts is updated so that ao_pcm will not hang. | 3823 // Ensure vo_pts is updated so that ao_pcm will not hang. |
3824 advance_timer(frame_time); | 3824 advance_timer(frame_time); |
3825 // only stop playing when audio is at end as well | 3825 // only stop playing when audio is at end as well |
3826 if (!mpctx->sh_audio || mpctx->d_audio->eof) | 3826 if (!mpctx->sh_audio || (mpctx->d_audio->eof && !ds_fill_buffer(mpctx->d_audio))) |
3827 mpctx->eof = 1; | 3827 mpctx->eof = 1; |
3828 } else { | 3828 } else { |
3829 // might return with !eof && !blit_frame if !correct_pts | 3829 // might return with !eof && !blit_frame if !correct_pts |
3830 mpctx->num_buffered_frames += blit_frame; | 3830 mpctx->num_buffered_frames += blit_frame; |
3831 mpctx->time_frame += frame_time / playback_speed; // for nosound | 3831 mpctx->time_frame += frame_time / playback_speed; // for nosound |