summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mplayer.c b/mplayer.c
index b62cb524ee..65c9731c53 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -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;
}