mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 17:12:36 +00:00
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.)
This commit is contained in:
parent
b2d058ef00
commit
c06cd1b993
@ -582,7 +582,7 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
|
|||||||
mp_audio_buffer_skip(mpctx->ao_buffer, played);
|
mp_audio_buffer_skip(mpctx->ao_buffer, played);
|
||||||
|
|
||||||
mpctx->audio_status = STATUS_PLAYING;
|
mpctx->audio_status = STATUS_PLAYING;
|
||||||
if (audio_eof) {
|
if (audio_eof && !mpctx->paused) {
|
||||||
mpctx->audio_status = STATUS_DRAINING;
|
mpctx->audio_status = STATUS_DRAINING;
|
||||||
// Wait until the AO has played all queued data. In the gapless case,
|
// Wait until the AO has played all queued data. In the gapless case,
|
||||||
// we trigger EOF immediately, and let it play asynchronously.
|
// we trigger EOF immediately, and let it play asynchronously.
|
||||||
|
Loading…
Reference in New Issue
Block a user