[Mplayer-cvslog] CVS: main subreader.c,1.128,1.129
Alex Beregszaszi
syncmail at mplayerhq.hu
Tue Apr 6 13:22:09 CEST 2004
CVS change done by Alex Beregszaszi
Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv692
Modified Files:
subreader.c
Log Message:
skip {...} parts in SAME subs, patch by Salvatore Falco
Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -r1.128 -r1.129
--- subreader.c 29 Jan 2004 10:53:19 -0000 1.128
+++ subreader.c 6 Apr 2004 11:22:06 -0000 1.129
@@ -144,6 +144,7 @@
current->text[current->lines++] = strdup (text);
s += 4;
}
+ else if ((*s == '{') && !sub_no_text_pp) { state = 5; ++s; continue; }
else if (*s == '<') { state = 4; }
else if (!strncasecmp (s, " ", 6)) { *p++ = ' '; s += 6; }
else if (*s == '\t') { *p++ = ' '; s++; }
@@ -168,6 +169,10 @@
s = strchr (s, '>');
if (s) { s++; state = 3; continue; }
break;
+ case 5: /* get rid of {...} text */
+ if (*s == '}') state = 3;
+ ++s;
+ continue;
}
/* read next line */
More information about the MPlayer-cvslog
mailing list