changeset 2880:d6343a243515

11110001.txt find_sub sig11 fixed
author arpi
date Tue, 13 Nov 2001 21:18:25 +0000
parents a3410c946b54
children 79142edcad77
files mplayer.c subreader.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Tue Nov 13 21:11:10 2001 +0000
+++ b/mplayer.c	Tue Nov 13 21:18:25 2001 +0000
@@ -565,7 +565,6 @@
 		   ||(0==strcmp(&sub_name[l-4],".UTF"))))
 	  sub_utf8=1;
        subtitles=sub_read_file(sub_name);
-       if (sub_num == 0) printf ("SUB: No subtitles found in %s\n",sub_name);
        if(!subtitles || sub_num == 0) mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CantLoadSub,sub_name);
   }
 #endif
--- a/subreader.c	Tue Nov 13 21:11:10 2001 +0000
+++ b/subreader.c	Tue Nov 13 21:18:25 2001 +0000
@@ -633,6 +633,11 @@
     if (sub_errs) printf (", %i bad line(s).\n", sub_errs);
     else 	  printf (".\n");
 
+    if(sub_num<=0){
+	free(first);
+	return NULL;
+    }
+
     return first;
 }