summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-09-01 21:27:51 +0200
committerwm4 <wm4@nowhere>2020-09-01 21:28:13 +0200
commit2f30d5c060e42339a301a8decb6c715a63909c0d (patch)
tree7fcf52a7bd03733741e9d373cad2ae8e0909cdb7
parent50c998afabb99e1956a32e0a6b08356b4dd0d042 (diff)
downloadmpv-2f30d5c060e42339a301a8decb6c715a63909c0d.tar.bz2
mpv-2f30d5c060e42339a301a8decb6c715a63909c0d.tar.xz
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.
-rw-r--r--player/audio.c4
1 files changed, 3 insertions, 1 deletions
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);
}