mirror of https://github.com/mpv-player/mpv
fix segfault when loading subtitles (idea by pl)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12894 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2ede18d078
commit
8c838b7a1d
|
@ -1657,8 +1657,10 @@ if(sh_video) {
|
|||
add_subtitles (*tmp2++, sh_video->fps, 0);
|
||||
free(tmp);
|
||||
if (set_of_sub_size == 0)
|
||||
{
|
||||
add_subtitles (mem_ptr=get_path("default.sub"), sh_video->fps, 1);
|
||||
free(mem_ptr); // release the buffer created by get_path()
|
||||
}
|
||||
if (set_of_sub_size > 0)
|
||||
add_subtitles (NULL, sh_video->fps, 1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue