[MPlayer-dev-eng] [PATCH] Two small subtitles improvments

Clément Bœsch ubitux at gmail.com
Wed Oct 6 19:57:24 CEST 2010


On Wed, Oct 06, 2010 at 06:49:49PM +0200, Reimar Döffinger wrote:
> On Wed, Oct 06, 2010 at 06:40:33PM +0200, Clément Bœsch wrote:
> > On Thu, Sep 30, 2010 at 11:12:50AM +0200, Clément Bœsch wrote:
> > > On Thu, Sep 30, 2010 at 08:11:18AM +0200, Reimar Döffinger wrote:
> > > > On Thu, Sep 30, 2010 at 12:33:38AM +0200, Clément Bœsch wrote:
> > > > > [...]
> > > > 
> > > > Using stristr instead of just checking the start might
> > > > actually increase the risk of conflict, particularly considering future
> > > > HTML- or XML-based formats...
> > > 
> > > Ok, fixed.
> > > 
> > > > Also removing the empty line does not really belong here
> > > 
> > > Well, according to the context, it was relative to the comments I removed:
> > > a separator was needed to know to what the comments were talking about.
> > > 
> > > > and don't
> > > > add a space after the function name for new code.
> > > 
> > > Ok.
> > > 
> > 
> > Ping?
> 
> Sorry, I never received that mail you are quoting there.
> Could you send the patch again?

Sure :)

-- 
Clément B.
-------------- next part --------------
Index: subreader.c
===================================================================
--- subreader.c	(revision 32415)
+++ subreader.c	(working copy)
@@ -1130,13 +1129,8 @@
 		{*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-dev-eng mailing list