diff options
author | wm4 <wm4@nowhere> | 2020-09-01 21:27:51 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-09-01 21:28:13 +0200 |
commit | 2f30d5c060e42339a301a8decb6c715a63909c0d (patch) | |
tree | 7fcf52a7bd03733741e9d373cad2ae8e0909cdb7 | |
parent | 50c998afabb99e1956a32e0a6b08356b4dd0d042 (diff) | |
download | mpv-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.c | 4 |
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); } |