From 2f30d5c060e42339a301a8decb6c715a63909c0d Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 1 Sep 2020 21:27:51 +0200 Subject: audio: do not show audio draining message when it does not make sense Just for the redundant message. The function which is called here, ao_drain(), does not care in which state it is called, and already handled this gracefully. --- player/audio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/player/audio.c b/player/audio.c index a1e7903be6..86b1a04500 100644 --- a/player/audio.c +++ b/player/audio.c @@ -216,7 +216,9 @@ void uninit_audio_out(struct MPContext *mpctx) } if (mpctx->ao) { // Note: with gapless_audio, stop_play is not correctly set - if (mpctx->opts->gapless_audio || mpctx->stop_play == AT_END_OF_FILE) { + if ((mpctx->opts->gapless_audio || mpctx->stop_play == AT_END_OF_FILE) && + ao_is_playing(mpctx->ao) && !get_internal_paused(mpctx)) + { MP_VERBOSE(mpctx, "draining left over audio\n"); ao_drain(mpctx->ao); } -- cgit v1.2.3