changeset 18099:c75f2ea46547

do not try to load default.sub when it doesn't exist. Fixes bug #480.
author reimar
date Sat, 15 Apr 2006 09:36:53 +0000
parents 58ace5bcf0ec
children 826a0faa2a0f
files mplayer.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Sat Apr 15 08:21:48 2006 +0000
+++ b/mplayer.c	Sat Apr 15 09:36:53 2006 +0000
@@ -3111,7 +3111,10 @@
     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()
     }
   }