[Mplayer-cvslog] CVS: main subreader.c,1.24,1.25

Megyer Laszlo laaz at mplayer.dev.hu
Tue Oct 9 02:18:44 CEST 2001


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

Modified Files:
	subreader.c 
Log Message:
ssa worx fine. Testers needed :)))


Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- subreader.c	29 Aug 2001 22:01:04 -0000	1.24
+++ subreader.c	9 Oct 2001 00:18:20 -0000	1.25
@@ -307,15 +307,21 @@
 	    hour2, min2, sec2, hunsec2, nothing;
 	
 	char line[1000],
-	     line2[1000];
+	     line3[1000],
+	     *line2;
 	do {
 		if (!fgets (line, 1000, fd)) return NULL;
 	} while (sscanf (line, "Dialogue: Marked=%d,%d:%d:%d.%d,%d:%d:%d.%d,"
-			"*Default,%d,%d,%d,%d,,%[^\n\r]", &nothing, &hour1, &min1,
-			&sec1, &hunsec1,
-			&hour2, &min2, &sec2, &hunsec2, &nothing,
-			&nothing, &nothing, &nothing, line2) < 14);
-	current->lines=1;
+			"%[^\n\r]", &nothing,
+			&hour1, &min1, &sec1, &hunsec1, 
+			&hour2, &min2, &sec2, &hunsec2,
+			line3) < 9);
+	line2=strstr(line3,",,");
+	if (!line2) return NULL;
+	line2 ++;
+	line2 ++;
+
+	current->lines=1; // ez a kiraly!!!
 	current->start = 360000*hour1 + 6000*min1 + 100*sec1 + hunsec1;
 	current->end   = 360000*hour2 + 6000*min2 + 100*sec2 + hunsec2;
 	current->text[0]=(char *) malloc(strlen(line2)+1);




More information about the MPlayer-cvslog mailing list