changeset 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 22355747d51f
children 3721d8f98dfe
files mplayer.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sat Aug 30 22:06:22 2014 +0000
+++ b/mplayer.c	Sun Aug 31 09:33:38 2014 +0000
@@ -3823,7 +3823,7 @@
                         // 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