100l: *chapter_name was copied from the pointer rather than strupd()-ed (and next free()d in mplayer.c

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19485 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2006-08-21 19:52:11 +00:00
parent b7b319395e
commit b38ff54517
1 changed files with 5 additions and 2 deletions

View File

@ -1135,8 +1135,11 @@ int demuxer_seek_chapter(demuxer_t *demuxer, int chapter, int mode, float *seek_
if(num_chapters)
*num_chapters = demuxer->num_chapters;
if(chapter_name)
*chapter_name = demuxer->chapters[current].name;
if(chapter_name) {
if(demuxer->chapters[current].name)
*chapter_name = strdup(demuxer->chapters[current].name);
else *chapter_name = NULL;
}
return current;
}