[Mplayer-cvslog] CVS: main subreader.c,1.87,1.88
Arpi of Ize
arpi at mplayerhq.hu
Sun Jan 5 03:46:28 CET 2003
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv2930
Modified Files:
subreader.c
Log Message:
some subviewer versions uses : instead of . or ,
reported by Nagy Gábor <ngabor79 at index.hu>
Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- subreader.c 4 Jan 2003 21:26:35 -0000 1.87
+++ subreader.c 5 Jan 2003 02:46:13 -0000 1.88
@@ -244,7 +244,7 @@
while (!current->text[0]) {
if (!fgets (line, LINE_LEN, fd)) return NULL;
- if ((len=sscanf (line, "%d:%d:%d%[,.]%d --> %d:%d:%d%[,.]%d",&a1,&a2,&a3,&i,&a4,&b1,&b2,&b3,&i,&b4)) < 10)
+ if ((len=sscanf (line, "%d:%d:%d%[,.:]%d --> %d:%d:%d%[,.:]%d",&a1,&a2,&a3,&i,&a4,&b1,&b2,&b3,&i,&b4)) < 10)
continue;
current->start = a1*360000+a2*6000+a3*100+a4/10;
current->end = b1*360000+b2*6000+b3*100+b4/10;
@@ -854,7 +854,7 @@
{sub_uses_time=0;return SUB_MICRODVD;}
if (sscanf (line, "%d:%d:%d.%d,%d:%d:%d.%d", &i, &i, &i, &i, &i, &i, &i, &i)==8)
{sub_uses_time=1;return SUB_SUBRIP;}
- if (sscanf (line, "%d:%d:%d%[,.]%d --> %d:%d:%d%[,.]%d", &i, &i, &i, &i, &i, &i, &i, &i, &i, &i)==10)
+ if (sscanf (line, "%d:%d:%d%[,.:]%d --> %d:%d:%d%[,.:]%d", &i, &i, &i, &i, &i, &i, &i, &i, &i, &i)==10)
{sub_uses_time=1;return SUB_SUBVIEWER;}
if (sscanf (line, "{T %d:%d:%d:%d",&i, &i, &i, &i))
{sub_uses_time=1;return SUB_SUBVIEWER2;}
More information about the MPlayer-cvslog
mailing list