changeset 5363:1f068f4bb6e7

vplayer sub fix by Arkadiusz Podgorski <wodzu@softomat.com.pl>
author arpi
date Wed, 27 Mar 2002 01:22:11 +0000
parents 5882b38e1c2d
children 4a743a02eb57
files subreader.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/subreader.c	Wed Mar 27 00:54:45 2002 +0000
+++ b/subreader.c	Wed Mar 27 01:22:11 2002 +0000
@@ -265,6 +265,7 @@
 		
 		if (!(current->start = a1*360000+a2*6000+a3*100))
 			continue;
+                /* removed by wodzu
 		p=line;	
  		// finds the body of the subtitle
  		for (i=0; i<3; i++){              
@@ -276,6 +277,11 @@
 		    printf("SUB: Skipping incorrect subtitle line!\n");
 		    continue;
 		}
+                */
+                // by wodzu: hey! this time we know what length it has! what is
+                // that magic for? it can't deal with space instead of third
+                // colon! look, what simple it can be:
+                p = &line[ plen ];
 
  		i=0;
 		if (*p!='|') {
@@ -489,6 +495,8 @@
 		{sub_uses_time=1; return SUB_SAMI;}
 	if (sscanf (line, "%d:%d:%d:",     &i, &i, &i )==3)
 		{sub_uses_time=1;return SUB_VPLAYER;}
+	if (sscanf (line, "%d:%d:%d ",     &i, &i, &i )==3)
+		{sub_uses_time=1;return SUB_VPLAYER;}
 	//TODO: just checking if first line of sub starts with "<" is WAY
 	// too weak test for RT
 	// Please someone who knows the format of RT... FIX IT!!!