[MPlayer-dev-eng] Some libass bugs

Uoti Urpala uoti.urpala at pp1.inet.fi
Wed May 2 06:17:14 CEST 2007


After the recent changes FT_Done_Glyph() is only called in
get_bitmap_glyph() if the bitmap is not in cache. However
get_outline_glyph() calls FT_Glyph_Copy() for every letter. Thus the
copy is leaked whenever a bitmap is found in cache. The memory leak is
pretty bad (I saw tens of MiB per minute before moving the call out of
the "if" clause).

The string allocated in update_font(),
desc.family = strdup(render_context.family);
is not freed anywhere.

ass_font_cache_add() makes a copy of the font data structure. Thus the
first ass_font_new() call returns one object, subsequent calls another
from the cache. The first object is leaked. Because bitmap rendering
compares fonts by memory address the cached bitmaps created with the
first font object become useless when the code moves to the second.




More information about the MPlayer-dev-eng mailing list