[Mplayer-cvslog] CVS: main subreader.c,1.61,1.62

Arpi of Ize arpi at mplayerhq.hu
Thu May 30 19:45:00 CEST 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv22085

Modified Files:
	subreader.c 
Log Message:
possible sig11 fixed in .rt parser (weisskreuzova.zip)


Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- subreader.c	27 May 2002 17:20:55 -0000	1.61
+++ subreader.c	30 May 2002 17:44:58 -0000	1.62
@@ -149,6 +149,8 @@
     int len=0;
     char *p=source;
     
+//    printf("src=%p  dest=%p  \n",source,dest);
+
     while ( !eol(*p) && *p!= '|' ) {
 	p++,len++;
     }
@@ -358,11 +360,14 @@
 	current->end   = b1*360000+b2*6000+b3*100+b4/10;
 	p=line;	p+=plen;i=0;
 	// TODO: I don't know what kind of convention is here for marking multiline subs, maybe <br/> like in xml?
-	next = strstr(line,"<clear/>")+8;i=0;
-	while ((next =sub_readtext (next, &(current->text[i])))) {
+	next = strstr(line,"<clear/>");
+	if(next && strlen(next)>8){
+	  next+=8;i=0;
+	  while ((next =sub_readtext (next, &(current->text[i])))) {
 		if (current->text[i]==ERR) {return ERR;}
 		i++;
 		if (i>=SUB_MAX_TEXT) { printf ("Too many lines in a subtitle\n");current->lines=i;return current;}
+	  }
 	}
 			current->lines=i+1;
     }




More information about the MPlayer-cvslog mailing list