1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-19 18:05:21 +00:00

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.
This commit is contained in:
Uoti Urpala 2009-05-03 21:48:58 +03:00
parent ce35ed0209
commit b863100784

View File

@ -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){