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

eugeni subversion at mplayerhq.hu
Mon May 19 20:37:27 CEST 2008


Author: eugeni
Date: Mon May 19 20:37:27 2008
New Revision: 26839

Log:
In case 2 styles have the same name, prefer the latest one.


Modified:
   trunk/libass/ass.c

Modified: trunk/libass/ass.c
==============================================================================
--- trunk/libass/ass.c	(original)
+++ trunk/libass/ass.c	Mon May 19 20:37:27 2008
@@ -163,7 +163,7 @@ static void rskip_spaces(char** str, cha
 static int lookup_style(ass_track_t* track, char* name) {
 	int i;
 	if (*name == '*') ++name; // FIXME: what does '*' really mean ?
-	for (i=0; i<track->n_styles; ++i) {
+	for (i = track->n_styles - 1; i >= 0; --i) {
 		// FIXME: mb strcasecmp ?
 		if (strcmp(track->styles[i].Name, name) == 0)
 			return i;



More information about the MPlayer-cvslog mailing list