changeset 858:48d144812f24

Wrong header lenght count for vplayer format fixed.
author eyck
date Thu, 24 May 2001 09:19:38 +0000
parents e03ac8b7fb1a
children 3560d38486ab
files subreader.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/subreader.c	Thu May 24 09:00:38 2001 +0000
+++ b/subreader.c	Thu May 24 09:19:38 2001 +0000
@@ -222,13 +222,13 @@
 	int a1,a2,a3,b1,b2,b3;
 	int setime,etime;
 	char *p=NULL, *q=NULL, *l=NULL,*next;
-	int i,len,len2;
+	int i,len,len2,plen;
 
 	bzero (current, sizeof(current));
 
 	while (!current->text[0]) {
 		if (!fgets (line, 1000, fd)) return NULL;
-		if ((len=sscanf (line, "%d:%d:%d:",&a1,&a2,&a3)) < 3)
+		if ((len=sscanf (line, "%d:%d:%d:%n",&a1,&a2,&a3,&plen)) < 3)
 			continue;
 		if (!fgets (line2, 1000, fd)) return NULL;
 		if ((len2=sscanf (line2, "%d:%d:%d:",&b1,&b2,&b3)) < 3)
@@ -239,7 +239,7 @@
 		current->start = a1*360000+a2*6000+a3*100;
 		current->end   = b1*360000+b2*6000+b3*100;
 		// teraz czas na wkopiowanie stringu
-		p=line;	p+=9;i=0;
+		p=line;	p+=plen;i=0;
 		if (*p!='|') {
 			//
 			next = p,i=0;