summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-04 22:05:29 +0200
committerwm4 <wm4@nowhere>2015-06-04 22:05:29 +0200
commitc06cd1b99399260a272537e1b1c5991919c26382 (patch)
tree4ebf94350451245b54972a97183f59a8e77e64e9
parentb2d058ef00513d52734c2b61e7a8be7b51fc01dd (diff)
downloadmpv-c06cd1b99399260a272537e1b1c5991919c26382.tar.bz2
mpv-c06cd1b99399260a272537e1b1c5991919c26382.tar.xz
audio: do not exit when loading small files in paused mode
When starting in paused mode, no audio is written to the device at all, because writing audio implicitly unpauses the AO. If the file is very small, and all audio fits within the AO buffer, this accidentally triggered the EOF condition. (In unpaused mode, it would write all audio, end playback, and then wait until the AO has everything played.)
-rw-r--r--player/audio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/player/audio.c b/player/audio.c
index 7a52acbc9a..41555d9150 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -582,7 +582,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) {
+ if (audio_eof && !mpctx->paused) {
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.