diff options
author | wm4 <wm4@nowhere> | 2015-07-24 17:27:04 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-24 17:27:04 +0200 |
commit | c581804603b01218de6b135b4b3156e837af15e4 (patch) | |
tree | 60e394ffdd8a042971f10e6e7063cf9cf8999af9 /player/audio.c | |
parent | 3cbf68b47079df130d2a767da7f6af352202112c (diff) | |
download | mpv-c581804603b01218de6b135b4b3156e837af15e4.tar.bz2 mpv-c581804603b01218de6b135b4b3156e837af15e4.tar.xz |
audio: fix EOF state with --keep-open
In paused mode, we never entered the audio EOF state. This shows e.g. in
--keep-open mode, which will not set the eof-reached property correctly.
Regression since commit c06cd1b9. This commit was the wrong fix. We need
to respect the buffer state, and pausing has nothing to do with this.
Fixes #2167.
Diffstat (limited to 'player/audio.c')
-rw-r--r-- | player/audio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c index cfad9e8195..48b14b735d 100644 --- a/player/audio.c +++ b/player/audio.c @@ -609,7 +609,7 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts) mp_audio_buffer_skip(mpctx->ao_buffer, played); mpctx->audio_status = STATUS_PLAYING; - if (audio_eof && !mpctx->paused) { + if (audio_eof && !mp_audio_buffer_samples(mpctx->ao_buffer)) { mpctx->audio_status = STATUS_DRAINING; // Wait until the AO has played all queued data. In the gapless case, // we trigger EOF immediately, and let it play asynchronously. |