From b863100784f74b7effb8cc89633161251e5b9ca7 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sun, 3 May 2009 21:48:58 +0300 Subject: 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. --- mplayer.c | 1 + 1 file changed, 1 insertion(+) 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){ -- cgit v1.2.3