From c06cd1b99399260a272537e1b1c5991919c26382 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 4 Jun 2015 22:05:29 +0200 Subject: 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.) --- player/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') 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. -- cgit v1.2.3