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

eugeni subversion at mplayerhq.hu
Wed May 9 23:38:28 CEST 2007


Author: eugeni
Date: Wed May  9 23:38:28 2007
New Revision: 23282

Log:
Don't deallocate font data if it will be used later.
It produced either segfault or "Error opening memory font" with any script
that contains embedded fonts.


Modified:
   trunk/libass/ass.c

Modified: trunk/libass/ass.c
==============================================================================
--- trunk/libass/ass.c	(original)
+++ trunk/libass/ass.c	Wed May  9 23:38:28 2007
@@ -572,8 +572,10 @@ static int decode_font(ass_track_t* trac
 	dsize = q - buf;
 	assert(dsize <= size / 4 * 3 + 2);
 	
-	if (track->library->extract_fonts)
+	if (track->library->extract_fonts) {
 		ass_add_font(track->library, track->parser_priv->fontname, (char*)buf, dsize);
+		buf = 0;
+	}
 
 error_decode_font:
 	if (buf) free(buf);



More information about the MPlayer-cvslog mailing list