summaryrefslogtreecommitdiffstats
path: root/sub/dec_sub.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-26 18:35:36 +0100
committerwm4 <wm4@nowhere>2015-12-26 18:35:36 +0100
commit190dea149aea07bc4be41c684a50db4231ccb0da (patch)
treeb4c164a1c741dd6c2283b3559d3b807b2ca8c226 /sub/dec_sub.h
parent8d4a179c144cb3e36762b2c3cef55d1d3bb9f951 (diff)
downloadmpv-190dea149aea07bc4be41c684a50db4231ccb0da.tar.bz2
mpv-190dea149aea07bc4be41c684a50db4231ccb0da.tar.xz
sub: destroy/recreate ASS_Renderer when disabling/enablings subs
Keeping ASS_Renderers around for a potentially large number of subtitle tracks could lead to excessive memory usage, especially since the libass cache is broken (caches even unneeded data), and might consume up to ~500MB of memory for no reason.
Diffstat (limited to 'sub/dec_sub.h')
-rw-r--r--sub/dec_sub.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sub/dec_sub.h b/sub/dec_sub.h
index 47386e6ef8..f1f738b695 100644
--- a/sub/dec_sub.h
+++ b/sub/dec_sub.h
@@ -41,6 +41,7 @@ void sub_get_bitmaps(struct dec_sub *sub, struct mp_osd_res dim, double pts,
struct sub_bitmaps *res);
char *sub_get_text(struct dec_sub *sub, double pts);
void sub_reset(struct dec_sub *sub);
+void sub_select(struct dec_sub *sub, bool selected);
int sub_control(struct dec_sub *sub, enum sd_ctrl cmd, void *arg);