summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-06-29 11:39:06 +0300
committerUoti Urpala <uau@mplayer2.org>2011-06-29 11:39:06 +0300
commita77e5f07ed513233314c18f3e45490fdfa11f6ba (patch)
treea369f5e54f1b91729712272f1f73ad3f0e7d7d66 /mplayer.c
parent9caae9b385a6de3f4dae98bebb1be64a997c1472 (diff)
parent27b88a09c5319deb62221b8cd0ecc14cd1136e4a (diff)
downloadmpv-a77e5f07ed513233314c18f3e45490fdfa11f6ba.tar.bz2
mpv-a77e5f07ed513233314c18f3e45490fdfa11f6ba.tar.xz
Merge branch 'mplayer1_changes'
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mplayer.c b/mplayer.c
index 406148aa46..e65afe5b0f 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -747,11 +747,6 @@ void exit_player_with_rc(struct MPContext *mpctx, enum exit_reason how, int rc)
current_module="exit_player";
-// free mplayer config
- if(mpctx->mconfig)
- m_config_free(mpctx->mconfig);
- mpctx->mconfig = NULL;
-
if(mpctx->playtree_iter)
play_tree_iter_free(mpctx->playtree_iter);
mpctx->playtree_iter = NULL;
@@ -781,6 +776,12 @@ void exit_player_with_rc(struct MPContext *mpctx, enum exit_reason how, int rc)
}
mp_msg(MSGT_CPLAYER,MSGL_DBG2,"max framesize was %d bytes\n",max_framesize);
+ // must be last since e.g. mp_msg uses option values
+ // that will be freed by this.
+ if (mpctx->mconfig)
+ m_config_free(mpctx->mconfig);
+ mpctx->mconfig = NULL;
+
exit(rc);
}