[MPlayer-cvslog] r32507 - trunk/subreader.c

reimar subversion at mplayerhq.hu
Sun Oct 17 18:00:04 CEST 2010


Author: reimar
Date: Sun Oct 17 18:00:04 2010
New Revision: 32507

Log:
More strict autodetection of RT subtitle format.
Patch by Clément Bœsch [ubitux gmail com].

Modified:
   trunk/subreader.c

Modified: trunk/subreader.c
==============================================================================
--- trunk/subreader.c	Sun Oct 17 17:56:04 2010	(r32506)
+++ trunk/subreader.c	Sun Oct 17 18:00:04 2010	(r32507)
@@ -1129,13 +1129,8 @@ static int sub_autodetect (stream_t* st,
 		{*uses_time=1;return SUB_VPLAYER;}
 	if (sscanf (line, "%d:%d:%d ",     &i, &i, &i )==3)
 		{*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!!!
-	// It may conflict with other sub formats in the future (actually it doesn't)
-	if ( *line == '<' )
+	if (!strncasecmp(line, "<window", 7))
 		{*uses_time=1;return SUB_RT;}
-
 	if (!memcmp(line, "Dialogue: Marked", 16))
 		{*uses_time=1; return SUB_SSA;}
 	if (!memcmp(line, "Dialogue: ", 10))


More information about the MPlayer-cvslog mailing list