mirror of
https://github.com/mpv-player/mpv
synced 2025-01-19 05:41:16 +00:00
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:
parent
b7b319395e
commit
b38ff54517
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user