do not try to load default.sub when it doesn't exist. Fixes bug #480.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18100 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-04-15 09:36:53 +00:00
parent f3ea1f9527
commit 480c621a2b
1 changed files with 4 additions and 1 deletions

View File

@ -3111,7 +3111,10 @@ if(sh_video) {
free(tmp);
if (set_of_sub_size == 0)
{
add_subtitles (mem_ptr=get_path("default.sub"), sh_video->fps, 1);
struct stat st;
mem_ptr = get_path("default.sub");
if (stat(mem_ptr, &st) == 0)
add_subtitles (mem_ptr, sh_video->fps, 0);
free(mem_ptr); // release the buffer created by get_path()
}
}