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

Arpi of Ize arpi at mplayer.dev.hu
Thu Aug 30 00:01:08 CEST 2001


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

Modified Files:
	subreader.c 
Log Message:
ehh. sizeof(pointer) bug fixed...

Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- subreader.c	29 Aug 2001 20:15:41 -0000	1.23
+++ subreader.c	29 Aug 2001 22:01:04 -0000	1.24
@@ -136,7 +136,7 @@
     char *p, *next;
     int i;
 
-    bzero (current, sizeof(current));
+    bzero (current, sizeof(subtitle));
 
     do {
 	if (!fgets (line, 1000, fd)) return NULL;
@@ -161,9 +161,9 @@
     char *p=NULL, *q=NULL;
     int len;
     
-    bzero (current, sizeof(current));
+    bzero (current, sizeof(subtitle));
     
-    while (!current->text[0]) {
+    while (1) {
 	if (!fgets (line, 1000, fd)) return NULL;
 	if (sscanf (line, "%d:%d:%d.%d,%d:%d:%d.%d",&a1,&a2,&a3,&a4,&b1,&b2,&b3,&b4) < 8) continue;
 	current->start = a1*360000+a2*6000+a3*100+a4;
@@ -181,6 +181,7 @@
 	    if (!*p || *p=='\r' || *p=='\n') break;
 	    while (*p++!=']');
 	}
+	break;
     }
     return current;
 }
@@ -191,7 +192,7 @@
     char *p=NULL;
     int i,len;
     
-    bzero (current, sizeof(current));
+    bzero (current, sizeof(subtitle));
     
     while (!current->text[0]) {
 	if (!fgets (line, 1000, fd)) return NULL;
@@ -224,7 +225,7 @@
 	char *p=NULL, *next;
 	int i,len,len2,plen;
 
-	bzero (current, sizeof(current));
+	bzero (current, sizeof(subtitle));
 
 	while (!current->text[0]) {
 		if (!fgets (line, 1000, fd)) return NULL;
@@ -270,7 +271,7 @@
     char *p=NULL,*next=NULL;
     int i,len,plen;
     
-    bzero (current, sizeof(current));
+    bzero (current, sizeof(subtitle));
     
     while (!current->text[0]) {
 	if (!fgets (line, 1000, fd)) return NULL;
@@ -327,7 +328,7 @@
     char line[1001];
     char text[1001];
 
-    bzero (current, sizeof(current));
+    bzero (current, sizeof(subtitle));
 
     if (!fgets (line, 1000, fd))
 	return NULL;




More information about the MPlayer-cvslog mailing list