]> granicus.if.org Git - libass/commit
Introduce simple cache memory management
authorGrigori Goronzy <greg@blackbox>
Sun, 19 Jul 2009 06:38:49 +0000 (08:38 +0200)
committerGrigori Goronzy <greg@blackbox>
Sun, 19 Jul 2009 13:56:23 +0000 (15:56 +0200)
commit3fd039c16184d5864c8a3be561c8b547b52ddf83
tree4b7bc7aade51fece064d32276188278d9c6aae68
parent7690af4af50fda163ed724e8d0f3ce5d9a9ec552
Introduce simple cache memory management

libass' cache was basically unmanaged; it would grow without any limits,
depending on how complex the subtitles are.  Introduce a simple limiting
that resets the cache if certain limits are exceeded.  The bitmap cache
is limited to approx. 50 MB size by default, while the glyph cache
allows storing up to 1000 glyphs by default.  A few tests with rather
heavily softsubbed fansubs show that these limits are fine.
The API was extended with the function ass_set_cache_limits which allows
modification of these limits.
libass/ass.h
libass/ass_cache.c
libass/ass_cache.h
libass/ass_render.c
libass/libass.sym