[MPlayer-cvslog] r26303 - trunk/libass/ass.c

eugeni subversion at mplayerhq.hu
Sun Mar 30 19:42:19 CEST 2008


Author: eugeni
Date: Sun Mar 30 19:42:19 2008
New Revision: 26303

Log:
Case insensitive parsing of SSA/ASS section headers.


Modified:
   trunk/libass/ass.c

Modified: trunk/libass/ass.c
==============================================================================
--- trunk/libass/ass.c	(original)
+++ trunk/libass/ass.c	Sun Mar 30 19:42:19 2008
@@ -647,17 +647,17 @@ static int process_fonts_line(ass_track_
 */ 
 static int process_line(ass_track_t* track, char *str)
 {
-	if (!strncmp(str, "[Script Info]", 13)) {
+	if (!strncasecmp(str, "[Script Info]", 13)) {
 		track->parser_priv->state = PST_INFO;
-	} else if (!strncmp(str, "[V4 Styles]", 11)) {
+	} else if (!strncasecmp(str, "[V4 Styles]", 11)) {
 		track->parser_priv->state = PST_STYLES;
 		track->track_type = TRACK_TYPE_SSA;
-	} else if (!strncmp(str, "[V4+ Styles]", 12)) {
+	} else if (!strncasecmp(str, "[V4+ Styles]", 12)) {
 		track->parser_priv->state = PST_STYLES;
 		track->track_type = TRACK_TYPE_ASS;
-	} else if (!strncmp(str, "[Events]", 8)) {
+	} else if (!strncasecmp(str, "[Events]", 8)) {
 		track->parser_priv->state = PST_EVENTS;
-	} else if (!strncmp(str, "[Fonts]", 7)) {
+	} else if (!strncasecmp(str, "[Fonts]", 7)) {
 		track->parser_priv->state = PST_FONTS;
 	} else {
 		switch (track->parser_priv->state) {



More information about the MPlayer-cvslog mailing list