[Mplayer-cvslog] CVS: main subreader.c,1.2,1.3

Berczi Gabor gabucino at users.sourceforge.net
Sun Apr 1 21:35:20 CEST 2001


Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv11227

Modified Files:
	subreader.c 
Log Message:

no more garbage! (fixed by laaz)


Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** subreader.c	2001/04/01 17:50:40	1.2
--- subreader.c	2001/04/01 19:35:18	1.3
***************
*** 62,68 ****
      next=p, i=0;
      while ((next =sub_readtext (next, &(current->text[i])))) {
!         if (current->text[i]==ERR || current->text[i]==ERR) {return ERR;}
  	i++;
! 	if (i>SUB_MAX_TEXT) { printf ("Too many lines in a subtitle\n");return ERR;}
      }
      current->lines=i+1;
--- 62,68 ----
      next=p, i=0;
      while ((next =sub_readtext (next, &(current->text[i])))) {
!         if (current->text[i]==ERR) {return ERR;}
  	i++;
! 	if (i>SUB_MAX_TEXT) { printf ("Too many lines in a subtitle\n");current->lines=i;return;}
      }
      current->lines=i+1;
***************
*** 93,96 ****
--- 93,97 ----
  	    if (!current->text[current->lines-1]) return ERR;
  	    strncpy (current->text[current->lines-1], q, len);
+ 	    current->text[current->lines-1][len]='\0';
  	    if (!*p || *p=='\r' || *p=='\n') break;
  	    while (*p++!=']');
***************
*** 121,125 ****
  		current->text[i]=(char *)malloc (len+1);
  		if (!current->text[i]) return ERR;
! 		strncpy (current->text[i], line, len);
  		i++;
  	    } else {
--- 122,126 ----
  		current->text[i]=(char *)malloc (len+1);
  		if (!current->text[i]) return ERR;
! 		strncpy (current->text[i], line, len); current->text[i][len]='\0';
  		i++;
  	    } else {


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list