# HG changeset patch # User eugeni # Date 1178746708 0 # Node ID dc12bca7d4b5d24035ed57083a12802b3aad50a0 # Parent f85d8e62735d6db5ba98f8093e31d9bf6c068fe4 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. diff -r f85d8e62735d -r dc12bca7d4b5 libass/ass.c --- a/libass/ass.c Wed May 09 21:34:05 2007 +0000 +++ b/libass/ass.c Wed May 09 21:38:28 2007 +0000 @@ -572,8 +572,10 @@ 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);