summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-05-03 21:48:58 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-05-03 21:48:58 +0300
commitb863100784f74b7effb8cc89633161251e5b9ca7 (patch)
tree600253aba1a84d2c260123b519c2203e78b378b4 /mplayer.c
parentce35ed0209a01e43f67f16abcd898cf69df078f2 (diff)
downloadmpv-b863100784f74b7effb8cc89633161251e5b9ca7.tar.bz2
mpv-b863100784f74b7effb8cc89633161251e5b9ca7.tar.xz
core: Set mpctx->chapters to NULL at uninit
The uninit code called talloc_free(mpctx->chapters) but didn't clear the pointer. As a result playing a file with ordered chapters and one without almost certainly triggered an abort when closing the second file. Fix by setting the pointer to NULL after freeing.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index 0f2cae6736..4a58b2dcdc 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -580,6 +580,7 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask){
mpctx->timeline = NULL;
mpctx->num_timeline_parts = 0;
talloc_free(mpctx->chapters);
+ mpctx->chapters = NULL;
mpctx->num_chapters = 0;
mpctx->video_offset = 0;
if(mpctx->demuxer){