[MPlayer-dev-eng] [PATCH] SSA subtitle reader fix

Dirk noisyb at gmx.net
Tue Jun 25 00:50:31 CEST 2002


Diego Biurrun wrote:

> Please send this as a unified diff.  Read DOCS/tech/patches.txt for all
> the details.
> Thanks
>
> Diego

here it is..


-------------- next part --------------
Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.64
diff -u -r1.64 subreader.c
--- subreader.c	3 Jun 2002 23:23:02 -0000	1.64
+++ subreader.c	24 Jun 2002 23:08:08 -0000
@@ -392,10 +392,18 @@
 			&hour1, &min1, &sec1, &hunsec1, 
 			&hour2, &min2, &sec2, &hunsec2,
 			line3) < 9);
+
+#if 0
 	line2=strstr(line3,",,");
-	if (!line2) return NULL;
-	line2 ++;
+#else
+        line2=strchr(line3, ',');
+        line2=strchr(++line2, ',');
+        line2=strchr(++line2, ',');
+        line2=strchr(++line2, ',');
+        line2=strchr(++line2, ',');
+#endif
 	line2 ++;
+	if (!line2) return NULL;
 
 	current->lines=0;num=0;
 	current->start = 360000*hour1 + 6000*min1 + 100*sec1 + hunsec1;


More information about the MPlayer-dev-eng mailing list