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.
This commit is contained in:
wm4 2020-09-01 21:27:51 +02:00
parent 50c998afab
commit 2f30d5c060
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}