Double-check that we are really at audio EOF by trying to refill.
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 31 Aug 2014 09:33:38 +0000 (09:33 +0000)
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 31 Aug 2014 09:33:38 +0000 (09:33 +0000)
Somewhat improves trac #2196.

git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@37261 b3059339-0415-0410-9bf9-f77b7e298cf2

mplayer.c

index 59c7084..6a32e88 100644 (file)
--- a/mplayer.c
+++ b/mplayer.c
@@ -3823,7 +3823,7 @@ goto_enable_cache:
                         // Ensure vo_pts is updated so that ao_pcm will not hang.
                         advance_timer(frame_time);
                         // only stop playing when audio is at end as well
-                        if (!mpctx->sh_audio || mpctx->d_audio->eof)
+                        if (!mpctx->sh_audio || (mpctx->d_audio->eof && !ds_fill_buffer(mpctx->d_audio)))
                             mpctx->eof = 1;
                     } else {
                         // might return with !eof && !blit_frame if !correct_pts