diff options
-rw-r--r-- | mixer.c | 3 | ||||
-rw-r--r-- | mplayer.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -271,6 +271,9 @@ void mixer_reinit(struct mixer *mixer, struct ao *ao) */ void mixer_uninit(struct mixer *mixer) { + if (!mixer->ao) + return; + checkvolume(mixer); if (mixer->muted_by_us) { /* Current audio output API combines playing the remaining buffered @@ -692,10 +692,10 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask) if (mask & INITIALIZED_AO) { mpctx->initialized_flags &= ~INITIALIZED_AO; - if (mpctx->ao) { + if (mpctx->mixer.ao) mixer_uninit(&mpctx->mixer); + if (mpctx->ao) ao_uninit(mpctx->ao, mpctx->stop_play != AT_END_OF_FILE); - } mpctx->ao = NULL; mpctx->mixer.ao = NULL; } |