[Mplayer-cvslog] CVS: main subreader.c,1.65,1.66
Arpi of Ize
arpi at mplayerhq.hu
Sat Jul 6 17:19:11 CEST 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv1624
Modified Files:
subreader.c
Log Message:
subrip sometimes uses pipe as newline separator - patch by MOLNAR Andor <dolphy at inf.elte.hu>
Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- subreader.c 29 Jun 2002 10:39:58 -0000 1.65
+++ subreader.c 6 Jul 2002 15:19:08 -0000 1.66
@@ -212,13 +212,14 @@
p=q=line;
for (current->lines=1; current->lines < SUB_MAX_TEXT; current->lines++) {
- for (q=p,len=0; *p && *p!='\r' && *p!='\n' && strncmp(p,"[br]",4); p++,len++);
+ for (q=p,len=0; *p && *p!='\r' && *p!='\n' && *p!='|' && strncmp(p,"[br]",4); p++,len++);
current->text[current->lines-1]=(char *)malloc (len+1);
if (!current->text[current->lines-1]) return ERR;
strncpy (current->text[current->lines-1], q, len);
current->text[current->lines-1][len]='\0';
if (!*p || *p=='\r' || *p=='\n') break;
- while (*p++!=']');
+ if (*p=='|') p++;
+ else while (*p++!=']');
}
break;
}
More information about the MPlayer-cvslog
mailing list